வெளியீட்டு அறிக்கை¶
பதிப்பு வரலாறு¶
இந்த அட்டவணை மெட்டா-தொகுப்பு பதிப்புகள் மற்றும் ஒவ்வொரு Qiskit உறுப்பின் பதிப்பு நிறுவப்பட்டது:
Qiskit Metapackage Version |
qiskit-terra |
qiskit-aer |
qiskit-ignis |
qiskit-ibmq-provider |
qiskit-aqua |
|---|
Note
` ` 0.7.0 ` , ` ` 0.7.1 ` `, மற்றும் ` 0.7.2 ` ` மெட்டா தொகுப்பு வெளியீடுகள் :ref:`பதிப்பு உத்தி கொள்கை இன்னும் முறைப்படுத்தப்படவில்லை.
குறிப்பிடத்தக்க மாற்றங்கள்¶
Qiskit 0.25.0¶
This release officially deprecates the Qiskit Aqua project. Accordingly, in a
future release the qiskit-aqua package will be removed from the Qiskit
metapackage, which means in that future release pip install qiskit will no
longer include qiskit-aqua. The application modules that are provided by
qiskit-aqua have been split into several new packages:
qiskit-optimization, qiskit-nature, qiskit-machine-learning, and
qiskit-finance. These packages can be installed by themselves (via the
standard pip install command, e.g. pip install qiskit-nature) or with the
rest of the Qiskit metapackage as optional extras (e.g.
pip install 'qiskit[finance,optimization]' or pip install 'qiskit[all]'
The core algorithms and the operator flow now exist as part of qiskit-terra at
qiskit.algorithms and qiskit.opflow. Depending on your existing
usage of Aqua you should either use the application packages or the new modules
in Qiskit Terra. For more details on how to migrate from Qiskit Aqua you can
refer to the Qiskit Aqua Migration Guide.
Terra 0.17.0¶
முன்னுரை¶
The Qiskit Terra 0.17.0 includes many new features and bug fixes. The major
new feature for this release is the introduction of the
qiskit.algorithms and qiskit.opflow modules which were
migrated and adapted from the qiskit.aqua project.
புதிய அம்சங்கள்¶
The
qiskit.pulse.call()function can now take aParameterobject along with a parameterized subroutine. This enables assigning different values to theParameterobjects for each subroutine call.உதாரணமாக
from qiskit.circuit import Parameter from qiskit import pulse amp = Parameter('amp') with pulse.build() as subroutine: pulse.play(pulse.Gaussian(160, amp, 40), DriveChannel(0)) with pulse.build() as main_prog: pulse.call(subroutine, amp=0.1) pulse.call(subroutine, amp=0.3)
The
qiskit.providers.models.QasmBackendConfigurationhas a new fieldprocessor_typewhich can optionally be used to provide information about a backend's processor in the form:{"family": <str>, "revision": <str>, segment: <str>}. For example:{"family": "Canary", "revision": "1.0", segment: "A"}.The
qiskit.pulse.Schedule,qiskit.pulse.Instruction, andqiskit.pulse.Channelclasses now have aparameterproperty which will return anyParameterobjects used in the object and ais_parameterized()method which will returnTrueif any parameters are used in the object.உதாரணத்திற்கு:
from qiskit.circuit import Parameter from qiskit import pulse shift = Parameter('alpha') schedule = pulse.Schedule() schedule += pulse.SetFrequency(shift, pulse.DriveChannel(0)) assert schedule.is_parameterized() == True print(schedule.parameters)
{Parameter(alpha)}Added a
PiecewiseChebyshevto theqiskit.circuit.libraryfor implementing a piecewise Chebyshev approximation of an input function. For a given function \(f(x)\) and degree \(d\), this class class implements a piecewise polynomial Chebyshev approximation on \(n\) qubits to \(f(x)\) on the given intervals. All the polynomials in the approximation are of degree \(d\).உதாரணத்திற்கு:
import numpy as np from qiskit import QuantumCircuit from qiskit.circuit.library.arithmetic.piecewise_chebyshev import PiecewiseChebyshev f_x, degree, breakpoints, num_state_qubits = lambda x: np.arcsin(1 / x), 2, [2, 4], 2 pw_approximation = PiecewiseChebyshev(f_x, degree, breakpoints, num_state_qubits) pw_approximation._build() qc = QuantumCircuit(pw_approximation.num_qubits) qc.h(list(range(num_state_qubits))) qc.append(pw_approximation.to_instruction(), qc.qubits) qc.draw(output='mpl')
The
BackendPropertiesclass now has areadout_length()method, which returns the readout length [sec] of the given qubit.A new class,
ScheduleBlock, has been added to theqiskit.pulsemodule. This class provides a new representation of a pulse program. This representation is best suited for the pulse builder syntax and is based on relative instruction ordering.This representation takes
alignment_contextinstead of specifying starting timet0for each instruction. The start time of instruction is implicitly allocated with the specified transformation and relative position of instructions.The
ScheduleBlockallows for lazy instruction scheduling, meaning we can assign arbitrary parameters to the duration of instructions.உதாரணத்திற்கு:
from qiskit.pulse import ScheduleBlock, DriveChannel, Gaussian from qiskit.pulse.instructions import Play, Call from qiskit.pulse.transforms import AlignRight from qiskit.circuit import Parameter dur = Parameter('rabi_duration') block = ScheduleBlock(alignment_context=AlignRight()) block += Play(Gaussian(dur, 0.1, dur/4), DriveChannel(0)) block += Call(measure_sched) # subroutine defined elsewhere
this code defines an experiment scanning a Gaussian pulse's duration followed by a measurement
measure_sched, i.e. a Rabi experiment. You can reuse theblockobject for every scanned duration by assigning a target duration value.Added a new function
array_to_latex()to theqiskit.visualizationmodule that can be used to represent and visualize vectors and matrices with LaTeX.from qiskit.visualization import array_to_latex from numpy import sqrt, exp, pi mat = [[0, exp(pi*.75j)], [1/sqrt(8), 0.875]] array_to_latex(mat)
\[\begin{split}\begin{bmatrix} 0 & \tfrac{1}{\sqrt{2}}(-1 + i) \\ \tfrac{1}{\sqrt{8}} & \tfrac{7}{8} \\ \end{bmatrix} \end{split}\]The
StatevectorandDensityMatrixclasses now havedraw()methods which allow objects to be drawn as either text matrices, IPython Latex objects, Latex source, Q-spheres, Bloch spheres and Hinton plots. By default the output type is the equivalent output from__repr__but this default can be changed in a user config file by setting thestate_draweroption. For example:from qiskit.quantum_info import DensityMatrix dm = DensityMatrix.from_label('r0') dm.draw('latex')
\[\begin{split}\begin{bmatrix} \tfrac{1}{2} & 0 & -\tfrac{1}{2}i & 0 \\ 0 & 0 & 0 & 0 \\ \tfrac{1}{2}i & 0 & \tfrac{1}{2} & 0 \\ 0 & 0 & 0 & 0 \\ \end{bmatrix} \end{split}\]from qiskit.quantum_info import Statevector sv = Statevector.from_label('+r') sv.draw('qsphere')
Additionally, the
draw()method is now used for the ipython display of these classes, so if you change the default output type in a user config file then when aStatevectoror aDensityMatrixobject are displayed in a jupyter notebook that output type will be used for the object.Pulse
qiskit.pulse.Instructionobjects and parametric pulse objects (egGaussiannow support usingParameterandParameterExpressionobjects for thedurationparameter. For example:from qiskit.circuit import Parameter from qiskit.pulse import Gaussian dur = Parameter('x_pulse_duration') double_dur = dur * 2 rx_pulse = Gaussian(dur, 0.1, dur/4) double_rx_pulse = Gaussian(double_dir, 0.1, dur/4)
Note that while we can create an instruction with a parameterized
durationadding an instruction with unbound parameterdurationto a schedule is supported only by the newly introduced representationScheduleBlock. See the known issues release notes section for more details.The
run()method for theQasmSimulatorPy,StatevectorSimulatorPy, andUnitarySimulatorPybackends now takes aQuantumCircuit(or a list ofQuantumCircuitobjects) as its input. The previousQasmQobjobject is still supported for now, but will be deprecated in a future release.For an example of how to use this see:
from qiskit import transpile, QuantumCircuit from qiskit.providers.basicaer import BasicAer backend = BasicAer.get_backend('qasm_simulator') circuit = QuantumCircuit(2) circuit.h(0) circuit.cx(0, 1) circuit.measure_all() tqc = transpile(circuit, backend) result = backend.run(tqc, shots=4096).result()
The
CommutativeCancellationtranspiler pass has a new optional kwarg on the constructorbasis_gates, which takes the a list of the names of basis gates for the target backend. When specified the pass will only use gates in thebasis_gateskwarg. Previously, the pass would automatically replace consecutive gates which commute withZGatewith theU1Gateunconditionally. Thebasis_gateskwarg enables you to specify which z-rotation gates are present in the target basis to avoid this.The constructors of the
Bitclass and subclasses,Qubit,Clbit, andAncillaQubit, have been updated such that their two parameters,registerandindexare now optional. This enables the creation of bit objects that are independent of a register.A new class,
BooleanExpression, has been added to theqiskit.circuit.classicalfunctionmodule. This class allows for creating an oracle from a Python boolean expression. For example:from qiskit.circuit import BooleanExpression, QuantumCircuit expression = BooleanExpression('~x & (y | z)') circuit = QuantumCircuit(4) circuit.append(expression, [0, 1, 2, 3]) circuit.draw('mpl')
circuit.decompose().draw('mpl')
The
BooleanExpressionalso includes a method,from_dimacs_file(), which allows loading formulas described in the DIMACS-CNF format. For example:from qiskit.circuit import BooleanExpression, QuantumCircuit boolean_exp = BooleanExpression.from_dimacs_file("simple_v3_c2.cnf") circuit = QuantumCircuit(boolean_exp.num_qubits) circuit.append(boolean_exp, range(boolean_exp.num_qubits)) circuit.draw('text')
┌───────────────────┐ q_0: ┤0 ├ │ │ q_1: ┤1 ├ │ SIMPLE_V3_C2.CNF │ q_2: ┤2 ├ │ │ q_3: ┤3 ├ └───────────────────┘circuit.decompose().draw('text')
q_0: ──o────o──────────── │ │ q_1: ──■────o────■─────── │ │ │ q_2: ──■────┼────o────■── ┌─┴─┐┌─┴─┐┌─┴─┐┌─┴─┐ q_3: ┤ X ├┤ X ├┤ X ├┤ X ├ └───┘└───┘└───┘└───┘Added a new class,
PhaseOracle, has been added to theqiskit.circuit.librarymodule. This class enables the construction of phase oracle circuits from Python boolean expressions.from qiskit.circuit.library.phase_oracle import PhaseOracle oracle = PhaseOracle('x1 & x2 & (not x3)') oracle.draw('mpl')
These phase oracles can be used as part of a larger algorithm, for example with
qiskit.algorithms.AmplificationProblem:from qiskit.algorithms import AmplificationProblem, Grover from qiskit import BasicAer backend = BasicAer.get_backend('qasm_simulator') problem = AmplificationProblem(oracle, is_good_state=oracle.evaluate_bitstring) grover = Grover(quantum_instance=backend) result = grover.amplify(problem) result.top_measurement
'011'
The
PhaseOracleclass also includes afrom_dimacs_file()method which enables constructing a phase oracle from a file describing a formula in the DIMACS-CNF format.from qiskit.circuit.library.phase_oracle import PhaseOracle oracle = PhaseOracle.from_dimacs_file("simple_v3_c2.cnf") oracle.draw('text')
state_0: ─o───────o────────────── │ ┌───┐ │ ┌───┐ state_1: ─■─┤ X ├─■─┤ X ├─■────── │ └───┘ └───┘ │ ┌───┐ state_2: ─■───────────────o─┤ Z ├ └───┘All transpiler passes (ie any instances of
BasePass) are now directly callable. Calling a pass provides a convenient interface for running the pass on aQuantumCircuitobject.For example, running a single transformation pass, such as
BasisTranslator, can be done with:from qiskit import QuantumCircuit from qiskit.transpiler.passes import BasisTranslator from qiskit.circuit.equivalence_library import SessionEquivalenceLibrary as sel circuit = QuantumCircuit(1) circuit.h(0) pass_instance = BasisTranslator(sel, ['rx', 'rz', 'cx']) result = pass_instance(circuit) result.draw(output='mpl')
When running an analysis pass, a property set (as
dictor asPropertySet) needs to be added as a parameter and it might be modified "in-place". For example:from qiskit import QuantumCircuit from qiskit.transpiler.passes import Depth circuit = QuantumCircuit(1) circuit.h(0) property_set = {} pass_instance = Depth() pass_instance(circuit, property_set) print(property_set)
{'depth': 1}The
QasmQobjConfigclass now has an optional kwarg formeas_levelandmeas_return. These fields can be used to enable generatingQasmQobjjob payloads that supportmeas_level=1(kerneled data) for circuit jobs (previously this was only exposed forPulseQobjobjects). Theassemble()function has been updated to set this field forQasmQobjobjects it generates.A new
tensor()method has been added to theQuantumCircuitclass. This method enables tensoring another circuit with an existing circuit. This method works analogously toqiskit.quantum_info.Operator.tensor()and is consistent with the little-endian convention of Qiskit.உதாரணத்திற்கு:
from qiskit import QuantumCircuit top = QuantumCircuit(1) top.x(0); bottom = QuantumCircuit(2) bottom.cry(0.2, 0, 1); bottom.tensor(top).draw(output='mpl')
The
qiskit.circuit.QuantumCircuitclass now supports arbitrary free form metadata with themetadataattribute. A user (or program built on top ofQuantumCircuit) can attach metadata to a circuit for use in tracking the circuit. For example:from qiskit.circuit import QuantumCircuit qc = QuantumCircuit(2, user_metadata_field_1='my_metadata', user_metadata_field_2='my_other_value')
அல்லது:
from qiskit.circuit import QuantumCircuit qc = QuantumCircuit(2) qc.metadata = {'user_metadata_field_1': 'my_metadata', 'user_metadata_field_2': 'my_other_value'}
This metadata will not be used for influencing the execution of the circuit but is just used for tracking the circuit for the lifetime of the object. The
metadataattribute will persist between any circuit transforms includingtranspile()andassemble(). The expectation is for providers to associate the metadata in the result it returns, so that users can filter results based on circuit metadata the same way they can currently do withQuantumCircuit.name.Add a new operator class
CNOTDihedralhas been added to theqiskit.quantum_infomodule. This class is used to represent the CNOT-Dihedral group, which is generated by the quantum gatesCXGate,TGate, andXGate.Adds a
&(__and__) binary operator toBaseOperatorsubclasses (egqiskit.quantum_info.Operator) in theqiskit.quantum_infomodule. This is shorthand to call the classescompose()method (ieA & B == A.compose(B)).உதாரணத்திற்கு:
import qiskit.quantum_info as qi qi.Pauli('X') & qi.Pauli('Y')
Adds a
&(__and__) binary operator toqiskit.quantum_info.Statevectorandqiskit.quantum_info.DensityMatrixclasses. This is shorthand to call the classesevolve()method (iepsi & U == psi.evolve(U)).உதாரணத்திற்கு:
import qiskit.quantum_info as qi qi.Statevector.from_label('0') & qi.Pauli('X')
A new a new 2-qubit gate,
ECRGate, the echo cross-resonance (ECR), has been added to theqiskit.circuit.librarymodule along with a corresponding method,ecr()for theQuantumCircuitclass. The ECR gate is two \(CR(\frac{π}{4})\) pulses with anXGatebetween them for the echo. This gate is locally equivalent to aCXGate(can convert to a CNOT with local pre- or post-rotation). It is the native gate on current IBM hardware and compiling to it allows the pre-/post-rotations to be merged into the rest of the circuit.A new kwarg
approximation_degreehas been added to thetranspile()function for enabling approximate compilation. Valid values range from 0 to 1, and higher means less approximation. This is a heuristic dial to experiment with circuit approximations. The concrete interpretation of this number is left to each pass, which may use it to perform some approximate version of the pass. Specific examples include theUnitarySynthesispass or the or translators to discrete gate sets. If a pass does not support this option, it implies exact transformation.Two new transpiler passess,
GateDirectionandqiskit.transpiler.passes.CheckGateDirection, were added to theqiskit.transpiler.passesmodule. These new passes are inteded to be more general replacements forCXDirectionandCheckCXDirection(which are both now deprecated, see the deprecation notes for more details) that perform the same function but work with other gates beside justCXGate.When running on Windows, parallel execution with the
parallel_map()function can now be enabled (it is still disabled by default). To do this you can either setparallel = Truein a user config file, or set theQISKIT_PARALLELenvironment variable toTRUE(this will also effecttranspile()andassemble()which both useparallel_map()internally). It is important to note that when enabling parallelism on Windows there are limitations around how Python launches processes for Windows, see the Known Issues section below for more details on the limitations with parallel execution on Windows.A new function,
hellinger_distance(), for computing the Hellinger distance between two counts distributions has been added to theqiskit.quantum_infomodule.The
decompose_clifford()function in theqiskit.quantum_infomodule (which gets used internally by theqiskit.quantum_info.Clifford.to_circuit()method) has a new kwargmethodwhich enables selecting the synthesis method used by either setting it to'AG'or'greedy'. By default for more than three qubits it is set to'greedy'which uses a non-optimal greedy compilation routine for Clifford elements synthesis, by Bravyi et. al., which typically yields better CX cost compared to the previously used Aaronson-Gottesman method (for more than two qubits). You can use themethodkwarg to revert to the previous default Aaronson-Gottesman method by settingmethod='AG'.The
Initializeclass in theqiskit.extensionsmodule can now be constructed using an integer. The '1' bits of the integer will insert aResetand anXGateinto the circuit for the corresponding qubit. This will be done using the standard little-endian convention is qiskit, ie the rightmost bit of the integer will set qubit 0. For example, setting the parameter inInitializeequal to5will set qubits 0 and 2 to value 1.from qiskit.extensions import Initialize initialize = Initialize(13) initialize.definition.draw('mpl')
The
Initializeclass in theqiskit.extensionsmodule now supports constructing directly from a Pauli label (analogous to theqiskit.quantum_info.Statevector.from_label()method). The Pauli label refer to basis states of the Pauli eigenstates Z, X, Y. These labels use Qiskit's standard little-endian notation, for example a label of'01'would initialize qubit 0 to \(|1\rangle\) and qubit 1 to \(|0\rangle\).from qiskit.extensions import Initialize initialize = Initialize("10+-lr") initialize.definition.draw('mpl')
The kwarg,
template_list, for the constructor of theqiskit.transpiler.passes.TemplateOptimizationtranspiler pass now supports taking in a list of bothQuantumCircuitandDAGDependencyobjects. Previously, onlyQuantumCircuitwere accepted (which were internally converted toDAGDependencyobjects) in the input list.A new transpiler pass,
qiskit.transpiler.passes.RZXCalibrationBuilder, capable of generating calibrations and adding them to a quantum circuit has been introduced. This pass takes calibratedCXGateobjects and creates the calibrations forqiskit.circuit.library.RZXGateobjects with an arbitrary rotation angle. The schedules are created by stretching and compressing theGaussianSquarepulses of the echoed-cross resonance gates.New template circuits for using
qiskit.circuit.library.RZXGateare added to theqiskit.circuit.librarymodule (egrzx_yz). This enables pairing theTemplateOptimizationpass with theqiskit.transpiler.passes.RZXCalibrationBuilderpass to automatically find and replace gate sequences, such asCNOT - P(theta) - CNOT, with more efficent circuits based onqiskit.circuit.library.RZXGatewith a calibration.The matplotlib output type for the
circuit_drawer()and thedraw()method for theQuantumCircuitclass now supports configuration files for setting the visualization style. In previous releases, there was basic functionality that allowed users to pass in astylekwarg that took in adictto customize the colors and other display features of thempldrawer. This has now been expanded so that these dictionaries can be loaded from JSON files directly without needing to pass a dictionary. This enables users to create new style files and use that style for visualizations by passing the style filename as a string to thestylekwarg.To leverage this feature you must set the
circuit_mpl_style_pathoption in a user config file. This option should be set to the path you want qiskit to search for style JSON files. If specifying multiple path entries they should be separated by:. For example, settingcircuit_mpl_style_path = ~/.qiskit:~/user_stylesin a user config file will look for JSON files in both~/.qiskitand~/user_styles.A new kwarg,
format_marginalhas been added to the functionmarginal_counts()which when set toTrueformats the counts output according to thecregsin the circuit and missing indices are represented with a_. For example:from qiskit import QuantumCircuit, execute, BasicAer, result from qiskit.result.utils import marginal_counts qc = QuantumCircuit(5, 5) qc.x(0) qc.measure(0, 0) result = execute(qc, BasicAer.get_backend('qasm_simulator')).result() print(marginal_counts(result.get_counts(), [0, 2, 4], format_marginal=True))
{'0_0_1': 1024}Improved the performance of
qiskit.quantum_info.Statevector.expectation_value()andqiskit.quantum_info.DensityMatrix.expectation_value()when the argument operator is aPauliorSparsePauliOpoperator.The user config file has 2 new configuration options,
num_processesandparallel, which are used to control the default behavior ofparallel_map(). Theparalleloption is a boolean that is used to dictate whetherparallel_map()will run in multiple processes or not. If it set toFalsecalls toparallel_map()will be executed serially, while setting it toTruewill enable parallel execution. Thenum_processesoption takes an integer which sets how many CPUs to use when executing in parallel. By default it will use the number of CPU cores on a system.There are 2 new environment variables,
QISKIT_PARALLELandQISKIT_NUM_PROCS, that can be used to control the default behavior ofparallel_map(). TheQISKIT_PARALLELoption can be set to theTRUE(any capitalization) to set the default to run in multiple processes whenparallel_map()is called. If it is set to any other valueparallel_map()will be executed serially.QISKIT_NUM_PROCStakes an integer (for exampleQISKIT_NUM_PROCS=5) which will be used as the default number of processes to run with. Both of these will take precedence over the equivalent option set in the user config file.A new method,
gradient(), has been added to theParameterExpressionclass. This method is used to evaluate the gradient of aParameterExpressionobject.The
__eq__method (ie what is called when the==operator is used) for theParameterExpressionnow allows for the comparison with a numeric value. Previously, it was only possible to compare two instances ofParameterExpressionwith==. For example:from qiskit.circuit import Parameter x = Parameter("x") y = x + 2 y = y.assign(x, -1) assert y == 1
The
PauliFeatureMapclass in theqiskit.circuit.librarymodule now supports adjusting the rotational factor, \(\alpha\), by either setting using the kwargalphaon the constructor or setting thealphaattribute after creation. Previously this value was fixed at2.0. Adjusting this attribute allows for better control of decision boundaries and provides additional flexibility handling the input features without needing to explicitly scale them in the data set.A new
Gateclass,PauliGate, has been added theqiskit.circuit.librarymodule and corresponding method,pauli(), was added to theQuantumCircuitclass. This new gate class enables applying several individual pauli gates to different qubits at the simultaneously. This is primarily useful for simulators which can use this new gate to more efficiently implement multiple simultaneous Pauli gates.Improve the
qiskit.quantum_info.Paulioperator. This class now represents and element from the full N-qubit Pauli group including complex coefficients. It now supports the Operator API methods includingcompose(),dot(),tensor()etc, where compose and dot are defined with respect to the full Pauli group.This class also allows conversion to and from the string representation of Pauli's for convenience.
For example
from qiskit.quantum_info import Pauli P1 = Pauli('XYZ') P2 = Pauli('YZX') P1.dot(P2)
Pauli('-iZXY')Pauli's can also be directly appended to
QuantumCircuitobjectsfrom qiskit import QuantumCircuit from qiskit.quantum_info import Pauli circ = QuantumCircuit(3) circ.append(Pauli('XYZ'), [0, 1, 2]) circ.draw(output='mpl')
Additional methods allow computing when two Pauli's commute (using the
commutes()method) or anticommute (using theanticommutes()method), and computing the Pauli resulting from Clifford conjugation \(P^\prime = C.P.C^\dagger\) using theevolve()method.See the API documentation of the
Pauliclass for additional information.A new function,
random_pauli(), for generating a random element of the N-qubit Pauli group has been added to theqiskit.quantum_infomodule.A new class,
PiecewisePolynomialPauliRotations, has been added to theqiskit.circuit.librarymodule. This circuit library element is used for mapping a piecewise polynomial function, \(f(x)\), which is defined through breakpoints and coefficients, on qubit amplitudes. The breakpoints \((x_0, ..., x_J)\) are a subset of \([0, 2^n-1]\), where \(n\) is the number of state qubits. The corresponding coefficients \([a_{j,1},...,a_{j,d}]\), where \(d\) is the highest degree among all polynomials. Then \(f(x)\) is defined as:\[\begin{split}f(x) = \begin{cases} 0, x < x_0 \\ \sum_{i=0}^{i=d}a_{j,i} x^i, x_j \leq x < x_{j+1} \end{cases}\end{split}\]where we implicitly assume \(x_{J+1} = 2^n\). And the mapping applied to the amplitudes is given by
\[F|x\rangle |0\rangle = \cos(p_j(x))|x\rangle |0\rangle + \sin(p_j(x))|x\rangle |1\rangle\]This mapping is based on controlled Pauli Y-rotations and constructed using the
PolynomialPauliRotations.A new module
qiskit.algorithmshas been introduced. This module contains functionality equivalent to what has previously been provided by theqiskit.aqua.algorithmsmodule (which is now deprecated) and provides the building blocks for constructing quantum algorithms. For details on migrating fromqiskit-aquato this new module please refer to the migration guide Qiskit Aqua Migration GuideA new module
qiskit.opflowhas been introduced. This module contains functionality equivalent to what has previously been provided by theqiskit.aqua.operatorsmodule (which is now deprecated) and provides the operators and state functions which are used to build quantum algorithms. For details on migrating fromqiskit-aquato this new module please refer to the migration guide Qiskit Aqua Migration GuideThis is the first release that includes precompiled binary wheels for the for Linux aarch64 systems. If you are running a manylinux2014 compatible aarch64 Linux system there are now precompiled wheels available on PyPI, you are no longer required to build from source to install qiskit-terra.
The
qiskit.quantum_info.process_fidelity()function is now able to be used with a non-unitary target channel. In this case the returned value is equivalent to theqiskit.quantum_info.state_fidelity()of the normalizedqiskit.quantum_info.Choimatrices for the channels.Note that the
qiskit.quantum_info.average_gate_fidelity()andqiskit.quantum_info.gate_error()functions still require the target channel to be unitary and will raise an exception if it is not.Added a new pulse builder function,
qiskit.pulse.macro(). This enables normal Python functions to be decorated as macros. This enables pulse builder functions to be used within the decorated function. The builder macro can then be called from within a pulse building context, enabling code reuse.உதாரணத்திற்கு:
from qiskit import pulse @pulse.macro def measure(qubit: int): pulse.play(pulse.GaussianSquare(16384, 256, 15872), pulse.MeasureChannel(qubit)) mem_slot = pulse.MemorySlot(0) pulse.acquire(16384, pulse.AcquireChannel(0), mem_slot) return mem_slot with pulse.build(backend=backend) as sched: mem_slot = measure(0) print(f"Qubit measured into {mem_slot}") sched.draw()
A new class,
PauliTwoDesign, was added to theqiskit.circuit.librarywhich implements a particular form of a 2-design circuit from https://arxiv.org/pdf/1803.11173.pdf For instance, this circuit can look like:from qiskit.circuit.library import PauliTwoDesign circuit = PauliTwoDesign(4, reps=2, seed=5, insert_barriers=True) circuit.decompose().draw(output='mpl')
A new pulse drawer
qiskit.visualization.pulse_v2.draw()(which is aliased asqiskit.visualization.pulse_drawer_v2) is now available. This new pulse drawer supports multiple new features not present in the original pulse drawer (pulse_drawer()).Truncation of long pulse instructions.
Visualization of parametric pulses.
New stylesheets
IQXStandard,IQXSimple,IQXDebugging.Visualization of system info (channel frequency, etc...) by specifying
qiskit.providers.Backendobjects for visualization.Specifying
axisobjects for plotting to allow further extension of generated plots, i.e., for publication manipulations.
New stylesheets can take callback functions that dynamically modify the apperance of the output image, for example, reassembling a collection of channels, showing details of instructions, updating appearance of pulse envelopes, etc... You can create custom callback functions and feed them into a stylesheet instance to modify the figure appearance without modifying the drawer code. See pulse drawer module docstrings for details.
Note that file saving is now delegated to Matplotlib. To save image files, you need to call
savefigmethod with returnedFigureobject.Adds a
reverse_qargs()method to theqiskit.quantum_info.Statevectorandqiskit.quantum_info.DensityMatrixclasses. This method reverses the order of subsystems in the states and is equivalent to theqiskit.circuit.QuantumCircuit.reverse_bits()method for N-qubit states. For example:from qiskit.circuit.library import QFT from qiskit.quantum_info import Statevector circ = QFT(3) state1 = Statevector.from_instruction(circ) state2 = Statevector.from_instruction(circ.reverse_bits()) state1.reverse_qargs() == state2
True
Adds a
reverse_qargs()method to theqiskit.quantum_info.Operatorclass. This method reverses the order of subsystems in the operator and is equivalent to theqiskit.circuit.QuantumCircuit.reverse_bits()method for N-qubit operators. For example:from qiskit.circuit.library import QFT from qiskit.quantum_info import Operator circ = QFT(3) op1 = Operator(circ) op2 = Operator(circ.reverse_bits()) op1.reverse_qargs() == op2
True
The
latexoutput method for theqiskit.visualization.circuit_drawer()function and thedraw()method now will use a user defined label on gates in the output visualization. For example:import math from qiskit.circuit import QuantumCircuit qc = QuantumCircuit(2) qc.h(0) qc.rx(math.pi/2, 0, label='My Special Rotation') qc.draw(output='latex')
The
routing_methodkwarg for thetranspile()function now accepts a new option,'none'. Whenrouting_method='none'no routing pass will be run as part of the transpilation. If the circuit does not fit coupling map aTranspilerErrorexception will be raised.A new gate class,
RVGate, was added to theqiskit.circuit.librarymodule along with the correspondingQuantumCircuitmethodrv(). TheRVGateis a general rotation gate, similar to theUGate, but instead of specifying Euler angles the three components of a rotation vector are specified where the direction of the vector specifies the rotation axis and the magnitude specifies the rotation angle about the axis in radians. For example:import math import np from qiskit.circuit import QuantumCircuit qc = QuantumCircuit(1) theta = math.pi / 5 phi = math.pi / 3 # RGate axis: axis = np.array([math.cos(phi), math.sin(phi)]) rotation_vector = theta * axis qc.rv(*rotation_vector, 0)
Unbound
Parameterobjects used in aQuantumCircuitobject will now be sorted by name. This will take effect for the parameters returned by theparametersattribute. Additionally, theqiskit.circuit.QuantumCircuit.bind_parameters()andqiskit.circuit.QuantumCircuit.assign_parameters()methods can now take in a list of a values which will bind/assign them to the parameters in name-sorted order. Previously these methods would only take a dictionary of parameters and values. For example:from qiskit.circuit import QuantumCircuit, Parameter circuit = QuantumCircuit(1) circuit.rx(Parameter('x'), 0) circuit.ry(Parameter('y'), 0) print(circuit.parameters) bound = circuit.bind_parameters([1, 2]) bound.draw(output='mpl')
ParameterView([Parameter(x), Parameter(y)])
The constructors for the
qiskit.quantum_info.Statevectorandqiskit.quantum_info.DensityMatrixclasses can now take aQuantumCircuitobject in to build aStatevectorandDensityMatrixobject from that circuit, assuming that the qubits are initialized in \(|0\rangle\). For example:from qiskit import QuantumCircuit from qiskit.quantum_info import Statevector qc = QuantumCircuit(2) qc.h(0) qc.cx(0, 1) statevector = Statevector(qc) statevector.draw(output='latex')
\[\begin{split}\begin{bmatrix} \tfrac{1}{\sqrt{2}} & 0 & 0 & \tfrac{1}{\sqrt{2}} \\ \end{bmatrix} \end{split}\]New fake backend classes are available under
qiskit.test.mock. These included mocked versions ofibmq_casablanca,ibmq_sydney,ibmq_mumbai,ibmq_lima,ibmq_belem,ibmq_quito. As with the other fake backends, these include snapshots of calibration data (i.e.backend.defaults()) and error data (i.e.backend.properties()) taken from the real system, and can be used for local testing, compilation and simulation.
தெரிந்த சிக்கல்கள்¶
Attempting to add an
qiskit.pulse.Instructionobject with a parameterizedduration(ie the value ofdurationis an unboundParameterorParameterExpressionobject) to aqiskit.pulse.Scheduleis not supported. Attempting to do so will result inUnassignedDurationErrorPulseErrorbeing raised. This is a limitation of how theInstructionoverlap constraints are evaluated currently. This is supported byScheduleBlock, in which the overlap constraints are evaluated just before the execution.On Windows systems when parallel execution is enabled for
parallel_map()parallelism may not work when called from a script running outside of aif __name__ == '__main__':block. This is due to how Python launches parallel processes on Windows. If aRuntimeErrororAttributeErrorare raised by scripts that callparallel_map()(including using functions that useparallel_map()internally liketranspile()) with Windows and parallelism enabled you can try embedding the script calls insideif __name__ == '__main__':to workaround the issue. For example:from qiskit import QuantumCircuit, QiskitError from qiskit import execute, Aer qc1 = QuantumCircuit(2, 2) qc1.h(0) qc1.cx(0, 1) qc1.measure([0,1], [0,1]) # making another circuit: superpositions qc2 = QuantumCircuit(2, 2) qc2.h([0,1]) qc2.measure([0,1], [0,1]) execute([qc1, qc2], Aer.get_backend('qasm_simulator'))
:: க்கு மாற்றப்பட வேண்டும்:
from qiskit import QuantumCircuit, QiskitError from qiskit import execute, Aer def main(): qc1 = QuantumCircuit(2, 2) qc1.h(0) qc1.cx(0, 1) qc1.measure([0,1], [0,1]) # making another circuit: superpositions qc2 = QuantumCircuit(2, 2) qc2.h([0,1]) qc2.measure([0,1], [0,1]) execute([qc1, qc2], Aer.get_backend('qasm_simulator')) if __name__ == '__main__': main()
if any errors are encountered with parallelism on Windows.
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
The preset pass managers
level_1_pass_manager,level_2_pass_manager, andlevel_3_pass_manager(which are used foroptimization_level1, 2, and 3 in thetranspile()andexecute()functions) now unconditionally use theOptimize1qGatesDecompositionpass for 1 qubit gate optimization. Previously, these pass managers would use theOptimize1qGatespass if the basis gates containedu1,u2, oru3. If you want to still use the oldOptimize1qGatesyou will need to construct a customPassManagerwith the pass.Following transpilation of a parameterized
QuantumCircuit, theglobal_phaseattribute of output circuit may no longer be returned in a simplified form, if the global phase is aParameterExpression.உதாரணத்திற்கு:
qc = QuantumCircuit(1) theta = Parameter('theta') qc.rz(theta, 0) qc.rz(-theta, 0) print(transpile(qc, basis_gates=['p']).global_phase)
previously returned
0, but will now return-0.5*theta + 0.5*theta. This change was necessary was to avoid a large runtime performance penalty as simplifying symbolic expressions can be quite slow, especially if there are manyParameterExpressionobjects in a circuit.The
BasicAerJobjob objects returned from BasicAer backends are now synchronous instances ofJobV1. This means that calls to therun()will block until the simulation finishes executing. If you want to restore the previous async behavior you'll need to wrap therun()with something that will run in a seperate thread or process likefutures.ThreadPoolExecutororfutures.ProcessPoolExecutor.The
allow_sample_measuringoption for the BasicAer simulatorQasmSimulatorPyhas changed from a default ofFalsetoTrue. This was done to better reflect the actual default behavior of the simulator, which would use sample measuring if the input circuit supported it (even if it was not enabled). If you are running a circuit that doesn't support sample measurement (ie it hasResetoperations or if there are operations after a measurement on a qubit) you should make sure to explicitly set this option toFalsewhen you callrun().The
CommutativeCancellationtranspiler pass is now aware of the target basis gates, which means it will only use gates in the specified basis. Previously, the pass would unconditionally replace consecutive gates which commute withZGatewith theU1Gate. However, now that the pass is basis aware and has a kwarg,basis_gates, for specifying the target basis there is a potential change in behavior if the kwarg is not set. When thebasis_gateskwarg is not used and there are no variable z-rotation gates in the circuit then no commutative cancellation will occur.Register(which is the parent class forQuantumRegisterandClassicalRegisterandBit(which is the parent class forQubitandClbit) objects are now immutable. In previous releases it was possible to adjust the value of asizeornameattributes of aRegisterobject and theindexorregisterattributes of aBitobject after it was initially created. However this would lead to unsound behavior that would corrupt container structure that rely on a hash (such as a dict) since these attributes are treated as immutable properties of a register or bit (see #4705 for more details). To avoid this unsound behavior this attributes of aRegisterandBitare no longer settable after initial creation. If you were previously adjusting the objects at runtime you will now need to create a newRegisterorBitobject with the new values.The
DAGCircuit.__eq__method (which is used by the==operator), which is used to check structural equality ofDAGCircuitandQuantumCircuitinstances, will now include theglobal_phaseandcalibrationsattributes in the fields checked for equality. This means that circuits which would have evaluated as equal in prior releases may not anymore if theglobal_phaseorcalibrationsdiffer between the circuits. For example, in previous releases this would returnTrue:import math from qiskit import QuantumCircuit qc1 = QuantumCircuit(1) qc1.x(0) qc2 = QuantumCircuit(1, global_phase=math.pi) qc2.x(0) print(qc2 == qc1)
However, now because the
global_phaseattribute of the circuits differ this will now returnFalse.The previously deprecated
qubits()andclbits()methods on theDAGCircuitclass, which were deprecated in the 0.15.0 Terra release, have been removed. Instead you should use thequbitsandclbitsattributes of theDAGCircuitclass. For example, if you were running:from qiskit.dagcircuit import DAGCircuit dag = DAGCircuit() qubits = dag.qubits()
That would be replaced by:
from qiskit.dagcircuit import DAGCircuit dag = DAGCircuit() qubits = dag.qubits
The
PulseDefaultsreturned by the fake pulse backendsqiskit.test.mock.FakeOpenPulse2Qandqiskit.test.mock.FakeOpenPulse3Qhave been updated to have more realistic pulse sequence definitions. If you are using these fake backend classes you may need to update your usage because of these changes.The default synthesis method used by
decompose_clifford()function in thequantum_infomodule (which gets used internally by theqiskit.quantum_info.Clifford.to_circuit()method) for more than 3 qubits now uses a non-optimal greedy compilation routine for Clifford elements synthesis, by Bravyi et. al., which typically yields better CX cost compared to the old default. If you need to revert to the previous Aaronson-Gottesman method this can be done by settingmethod='AG'.The previously deprecated module
qiskit.visualization.interactive, which was deprecated in the 0.15.0 release, has now been removed. Instead you should use the matplotlib based visualizations:Removed Interactive function
Equivalent matplotlib function
iplot_bloch_multivectoriplot_state_cityiplot_state_qsphereiplot_state_hintoniplot_histogramiplot_state_paulivecThe
qiskit.Aerandqiskit.IBMQtop level attributes are now lazy loaded. This means that the objects will now always exist and warnings will no longer be raised on import ifqiskit-aerorqiskit-ibmq-providerare not installed (or can't be found by Python). If you were checking for the presence ofqiskit-aerorqiskit-ibmq-providerusing these module attributes and explicitly comparing toNoneor looking for the absence of the attribute this no longer will work because they are always defined as an object now. In other words running something like:try: from qiskit import Aer except ImportError: print("Aer not available") or:: try: from qiskit import IBMQ except ImportError: print("IBMQ not available")
will no longer work. Instead to determine if those providers are present you can either explicitly use
qiskit.providers.aer.Aerandqiskit.providers.ibmq.IBMQ:try: from qiskit.providers.aer import Aer except ImportError: print("Aer not available") try: from qiskit.providers.ibmq import IBMQ except ImportError: print("IBMQ not available")
or check
bool(qiskit.Aer)andbool(qiskit.IBMQ)instead, for example:import qiskit if not qiskit.Aer: print("Aer not available") if not qiskit.IBMQ: print("IBMQ not available")
This change was necessary to avoid potential import cycle issues between the qiskit packages and also to improve the import time when Aer or IBMQ are not being used.
The user config file option
suppress_packaging_warningsoption in the user config file and theQISKIT_SUPPRESS_PACKAGING_WARNINGSenvironment variable no longer has any effect and will be silently ignored. The warnings this option controlled have been removed and will no longer be emitted at import time from theqiskitmodule.The previously deprecated
conditionkwarg forqiskit.dagcircuit.DAGNodeconstructor has been removed. It was deprecated in the 0.15.0 release. Instead you should now be setting the classical condition on theInstructionobject passed into theDAGNodeconstructor when creating a newopnode.When creating a new
Register(which is the parent class forQuantumRegisterandClassicalRegister) orQuantumCircuitobject with a number of bits (egQuantumCircuit(2)), it is now required that number of bits are specified as an integer or another type which is castable to unambiguous integers(e.g.2.0). Non-integer values will now raise an error as the intent in those cases was unclear (you can't have fractional bits). For more information on why this was changed refer to: #4855networkx is no longer a requirement for qiskit-terra. All the networkx usage inside qiskit-terra has been removed with the exception of 3 methods:
If you are using any of these methods you will need to manually install networkx in your environment to continue using them.
By default on macOS with Python >=3.8
parallel_map()will no longer run in multiple processes. This is a change from previous releases where the default behavior was thatparallel_map()would launch multiple processes. This change was made because with newer versions of macOS with Python 3.8 and 3.9 multiprocessing is either unreliable or adds significant overhead because of the change in Python 3.8 to launch new processes withspawninstead offork. To re-enable parallel execution on macOS with Python >= 3.8 you can use the user config fileparalleloption or set the environment variableQISKIT_PARALLELtoTrue.The previously deprecated kwarg
callbackon the constructor for thePassManagerclass has been removed. This kwarg has been deprecated since the 0.13.0 release (April, 9th 2020). Instead you can pass thecallbackkwarg to theqiskit.transpiler.PassManager.run()method directly. For example, if you were using:from qiskit.circuit.random import random_circuit from qiskit.transpiler import PassManager qc = random_circuit(2, 2) def callback(**kwargs) print(kwargs['pass_']) pm = PassManager(callback=callback) pm.run(qc)
this can be replaced with:
from qiskit.circuit.random import random_circuit from qiskit.transpiler import PassManager qc = random_circuit(2, 2) def callback(**kwargs) print(kwargs['pass_']) pm = PassManager() pm.run(qc, callback=callback)
It is now no longer possible to instantiate a base channel without a prefix, such as
qiskit.pulse.Channelorqiskit.pulse.PulseChannel. These classes are designed to classify types of different user facing channel classes, such asqiskit.pulse.DriveChannel, but do not have a definition as a target resource. If you were previously directly instantiating eitherqiskit.pulse.Channelorqiskit.pulse.PulseChannel, this is no longer allowed. Please use the appropriate subclass.When the
require_cpand/orrequire_tpkwargs ofqiskit.quantum_info.process_fidelity(),qiskit.quantum_info.average_gate_fidelity(),qiskit.quantum_info.gate_error()areTrue, they will now only log a warning rather than the previous behavior of raising aQiskitErrorexception if the input channel is non-CP or non-TP respectively.The
QFTclass in theqiskit.circuit.librarymodule now computes the Fourier transform using a little-endian representation of tensors, i.e. the state \(|1\rangle\) maps to \(|0\rangle - |1\rangle + |2\rangle - ..\) assuming the computational basis correspond to little-endian bit ordering of the integers. \(|0\rangle = |000\rangle, |1\rangle = |001\rangle\), etc. This was done to make it more consistent with the rest of Qiskit, which uses a little-endian convention for bit order. If you were depending on the previous bit order you can use thereverse_bits()method to revert to the previous behavior. For example:from qiskit.circuit.library import QFT qft = QFT(5).reverse_bits()
The
qiskit.__qiskit_version__module attribute was previously adictwill now return a custom read-onlyMappingobject that checks the version of qiskit elements at runtime instead of at import time. This was done to speed up the import path of qiskit and eliminate a possible import cycle by only importing the element packages at runtime if the version is needed from the package. This should be fully compatible with thedictpreviously return and for most normal use cases there will be no difference. However, if some applications were relying on either mutating the contents or explicitly type checking it may require updates to adapt to this change.The
qiskit.executemodule has been renamed toqiskit.execute_function. This was necessary to avoid a potentical name conflict between theexecute()function which is re-exported asqiskit.execute.qiskit.executethe function in some situations could conflict withqiskit.executethe module which would lead to a cryptic error because Python was treatingqiskit.executeas the module when the intent was to the function or vice versa. The module rename was necessary to avoid this conflict. If you're importingqiskit.executeto get the module (typical usage wasfrom qiskit.execute import execute) you will need to update this to useqiskit.execute_functioninstead.qiskit.executewill now always resolve to the function.The
qiskit.compiler.transpile,qiskit.compiler.assemble,qiskit.compiler.schedule, andqiskit.compiler.sequencemodules have been renamed toqiskit.compiler.transpiler,qiskit.compiler.assembler,qiskit.compiler.scheduler, andqiskit.compiler.sequencerespectively. This was necessary to avoid a potentical name conflict between the modules and the re-exported function pathsqiskit.compiler.transpile(),qiskit.compiler.assemble(),qiskit.compiler.schedule(), andqiskit.compiler.sequence(). In some situations this name conflict between the module path and re-exported function path would lead to a cryptic error because Python was treating an import as the module when the intent was to use the function or vice versa. The module rename was necessary to avoid this conflict. If you were using the imports to get the modules before (typical usage would be like``from qiskit.compiler.transpile import transpile``) you will need to update this to use the new module paths.qiskit.compiler.transpile(),qiskit.compiler.assemble(),qiskit.compiler.schedule(), andqiskit.compiler.sequence()will now always resolve to the functions.The
qiskit.quantum_info.Quaternionclass was moved from theqiskit.quantum_info.operatorsubmodule to theqiskit.quantum_info.synthesissubmodule to better reflect it's purpose. No change is required if you were importing it from the rootqiskit.quantum_infomodule, but if you were importing fromqiskit.quantum_info.operatoryou will need to update your import path.Removed the
QuantumCircuit.mcmtmethod, which has been deprecated since the Qiskit Terra 0.14.0 release in April 2020. Instead of using the method, please use theMCMTclass instead to construct a multi-control multi-target gate and use theqiskit.circuit.QuantumCircuit.append()orqiskit.circuit.QuantumCircuit.compose()to add it to a circuit.For example, you can replace:
circuit.mcmt(ZGate(), [0, 1, 2], [3, 4])
with:
from qiskit.circuit.library import MCMT mcmt = MCMT(ZGate(), 3, 2) circuit.compose(mcmt, range(5))
Removed the
QuantumCircuit.diag_gatemethod which has been deprecated since the Qiskit Terra 0.14.0 release in April 2020. Instead, use thediagonal()method ofQuantumCircuit.Removed the
QuantumCircuit.ucymethod which has been deprecated since the Qiskit Terra 0.14.0 release in April 2020. Instead, use theucry()method ofQuantumCircuit.The previously deprecated
mirror()method forqiskit.circuit.QuantumCircuithas been removed. It was deprecated in the 0.15.0 release. Theqiskit.circuit.QuantumCircuit.reverse_ops()method should be used instead since mirroring could be confused with swapping the output qubits of the circuit. Thereverse_ops()method only reverses the order of gates that are applied instead of mirroring.The previously deprecated support passing a float (for the
scalekwarg as the first positional argument to theqiskit.circuit.QuantumCircuit.draw()has been removed. It was deprecated in the 0.12.0 release. The first positional argument to theqiskit.circuit.QuantumCircuit.draw()method is now theoutputkwarg which does not accept a float. Instead you should be usingscaleas a named kwarg instead of using it positionally.For example, if you were previously calling
drawwith:from qiskit import QuantumCircuit qc = QuantumCircuit(2) qc.draw(0.75, output='mpl')
this would now need to be:
from qiskit import QuantumCircuit qc = QuantumCircuit(2) qc.draw(output='mpl', scale=0.75)
அல்லது:
qc.draw('mpl', scale=0.75)
Features of Qiskit Pulse (
qiskit.pulse) which were deprecated in the 0.15.0 release (August, 2020) have been removed. The full set of changes are:Module
பழைய
புதிய
qiskit.pulse.librarySamplePulseqiskit.pulse.libraryConstantPulse(module rename)
pulse.pulse_libModuleவகுப்பு
Old method
New method
ParametricPulseget_sample_pulseget_waveformcommandN/A. Commands and Instructions have been unified. Use
operands()to get information about the instruction data.acquires,mem_slots,reg_slotsacquire(),mem_slot(),reg_slot(). (TheAcquireinstruction no longer broadcasts across multiple qubits.)The dictionary previously held on
DAGCircuitedges has been removed. Instead, edges now hold theBitinstance which had previously been included in the dictionary as its'wire'field. Note that the NetworkX graph returned byto_networkx()will still have a dictionary for its edge attributes, but the'name'field will no longer be populated.The
parametersattribute of theQuantumCircuitclass no longer is returning aset. Instead it returns aParameterViewobject which implements all the methods thatsetoffers (albeit deprecated). This was done to support a model that preserves name-sorted parameters. It should be fully compatible with any previous usage of thesetreturned by theparametersattribute, except for where explicit type checking of a set was done.When running
transpile()on aQuantumCircuitwithdelay()instructions, the units will be converted to dt if the value of dt (sample time) is known totranspile(), either explicitly via thedtkwarg or via theBackendConfigurationfor aBackendobject passed in via thebackendkwarg.The interpretation of
meas_map(which is an attribute of aPulseBackendConfigurationobject or as the correspondingmeas_mapkwarg on theschedule(),assemble(),sequence(), orexecute()functions) has been updated to better match the true constraints of the hardware. The format of this data is a list of lists, where the items in the inner list are integers specifying qubit labels. For instance:[[A, B, C], [D, E, F, G]]
Previously, the
meas_mapconstraint was interpreted such that if one qubit was acquired (e.g. A), then all other qubits sharing a subgroup with that qubit (B and C) would have to be acquired at the same time and for the same duration. This constraint has been relaxed. One acquisition does not require more acquisitions. (If A is acquired, B and C do not need to be acquired.) Instead, qubits in the same measurement group cannot be acquired in a partially overlapping way -- think of themeas_mapas specifying a shared acquisition resource (If we acquire A fromt=1000tot=2000, we cannot acquire B starting from1000<t<2000). For example:# Good meas_map = [[0, 1]] # Acquire a subset of [0, 1] sched = pulse.Schedule() sched = sched.append(pulse.Acquire(10, acq_q0)) # Acquire 0 and 1 together (same start time, same duration) sched = pulse.Schedule() sched = sched.append(pulse.Acquire(10, acq_q0)) sched = sched.append(pulse.Acquire(10, acq_q1)) # Acquire 0 and 1 disjointly sched = pulse.Schedule() sched = sched.append(pulse.Acquire(10, acq_q0)) sched = sched.append(pulse.Acquire(10, acq_q1)) << 10 # Acquisitions overlap, but 0 and 1 aren't in the same measurement # grouping meas_map = [[0], [1]] sched = pulse.Schedule() sched = sched.append(pulse.Acquire(10, acq_q0)) sched = sched.append(pulse.Acquire(10, acq_q1)) << 1 # Bad: 0 and 1 are in the same grouping, but acquisitions # partially overlap meas_map = [[0, 1]] sched = pulse.Schedule() sched = sched.append(pulse.Acquire(10, acq_q0)) sched = sched.append(pulse.Acquire(10, acq_q1)) << 1
தேய்மான குறிப்புகள்¶
Two new arguments have been added to
qiskit.dagcircuit.DAGNode.semantic_eq(),bit_indices1andbit_indices2, which are expected to map theBitinstances in eachDAGNodeto their index inqubitsorclbitslist of their respectiveDAGCircuit. During the deprecation period, these arguments are optional and when not specified the mappings will be automatically constructed based on theregisterandindexproperties of eachBitinstance. However, in a future release, they will be required arguments and the mapping will need to be supplied by the user.The
pulsebuilder functions:qiskit.pulse.call_circuit()qiskit.pulse.call_schedule()
are deprecated and will be removed in a future release. These functions are unified into
qiskit.pulse.call()which should be used instead.The
qiskit.pulse.Schedulemethodqiskit.pulse.Schedule.flatten()method is deprecated and will be removed in a future release. Instead you can use theqiskit.pulse.transforms.flatten()function which will perform the same operation.The
assign_parameters()for the following classes:qiskit.pulse.library.Pulse,
and all their subclasses is now deprecated and will be removed in a future release. This functionality has been subsumed
ScheduleBlockwhich is the future direction for constructing parameterized pulse programs.The
parametersattribute for the following clasess:is deprecated and will be removed in a future release. This functionality has been subsumed
ScheduleBlockwhich is the future direction for constructing parameterized pulse programs.Python 3.6 support has been deprecated and will be removed in a future release. When support is removed you will need to upgrade the Python version you're using to Python 3.7 or above.
Two
QuantumCircuitmethodscombine()andextend()along with their corresponding Python operators+and+=are deprecated and will be removed in a future release. Instead theQuantumCircuitmethodcompose()should be used. Thecompose()method allows more flexibility in composing two circuits that do not have matching registers. It does not, however, automatically add qubits/clbits unlike the deprecated methods. To add a circuit on new qubits/clbits, theqiskit.circuit.QuantumCircuit.tensor()method can be used. For example:from qiskit.circuit import QuantumRegister, QuantumCircuit a = QuantumRegister(2, 'a') circuit_a = QuantumCircuit(a) circuit_a.cx(0, 1) b = QuantumRegister(2, 'b') circuit_b = QuantumCircuit(b) circuit_b.cz(0, 1) # same as circuit_a + circuit_b (or combine) added_with_different_regs = circuit_b.tensor(circuit_a) # same as circuit_a + circuit_a (or combine) added_with_same_regs = circuit_a.compose(circuit_a) # same as circuit_a += circuit_b (or extend) circuit_a = circuit_b.tensor(circuit_a) # same as circuit_a += circuit_a (or extend) circuit_a.compose(circuit_a, inplace=True)
Support for passing
Qubitinstances to thequbitskwarg of theqiskit.transpiler.InstructionDurations.get()method has been deprecated and will be removed in a future release. Instead, you should call theget()method with the integer indices of the desired qubits.Using
@(__matmul__) for invoking thecomposemethod ofBaseOperatorsubclasses (egOperator) is deprecated and will be removed in a future release. Theqiskit.quantum_info.Operator.compose()method can be used directly or also invoked using the&(__and__) operator.Using
*(__mul__) for calling thedot()method ofBaseOperatorsubclasses (egqiskit.quantum_info.Operator) is deprecated and will be removed in a future release. Instead you can just call thedot()directly.Using
@(__matmul__) for invoking theevolve()method of theqiskit.quantum_info.Statevectorandqiskit.quantum_info.DensityMatrixclasses is deprecated and will be removed in a future release.. Theevolvemethod can be used directly or also invoked using the&(__and__) operator.The
qiskit.pulse.schedule.ParameterizedScheduleclass has been deprecated and will be removed in a future release. Instead you can directly parameterize pulseScheduleobjects with aParameterobject, for example:from qiskit.circuit import Parameter from qiskit.pulse import Schedule from qiskit.pulse import ShiftPhase, DriveChannel theta = Parameter('theta') target_schedule = Schedule() target_schedule.insert(0, ShiftPhase(theta, DriveChannel(0)), inplace=True)
The
qiskit.pulse.ScheduleComponentclass in theqiskit.pulsemodule has been deprecated and will be removed in a future release. Its usage should be replaced either using aqiskit.pulse.Scheduleorqiskit.pulse.Instructiondirectly. Additionally, the primary purpose of theScheduleComponentclass was as a common base class for bothScheduleandInstructionfor any place that was explicitly type checking or documenting accepting aScheduleComponentinput should be updated to acceptInstructionorSchedule.The JSON Schema files and usage for the IBMQ API payloads are deprecated and will be removed in a future release. This includes everything under the
qiskit.schemasmodule and theqiskit.validationmodule. This also includes thevalidatekwargs forqiskit.qobj.QasmQobj.to_dict()andqiskit.qobj.QasmQobj.to_dict()along with the module level fastjsonschema validators inqiskit.qobj(which do not raise a deprecation warning). The schema files have been moved to the Qiskit/ibmq-schemas repository and those should be treated as the canonical versions of the API schemas. Moving forward only those schemas will recieve updates and will be used as the source of truth for the schemas. If you were relying on the schemas bundled in qiskit-terra you should update to use that repository instead.The
qiskit.utilmodule has been deprecated and will be removed in a future release. It has been replaced byqiskit.utilswhich provides the same functionality and will be expanded in the future. Note that noDeprecationWarningwill be emitted regarding this deprecation since it was not feasible on Python 3.6.The
CXDirectiontranspiler pass in theqiskit.transpiler.passesmodule has been deprecated and will be removed in a future release. Instead theGateDirectionshould be used. It behaves identically to theCXDirectionexcept that it now also supports transforming a circuit withECRGategates in addition toCXGategates.The
CheckCXDirectiontranspiler pass in theqiskit.transpiler.passesmodule has been deprecated and will be removed in a future release. Instead theCheckGateDirectionpass should be used. It behaves identically to theCheckCXDirectionexcept that it now also supports checking the direction of all 2-qubit gates, not justCXGategates.The
WeightedAddermethodnum_ancilla_qubits()is deprecated and will be removed in a future release. It has been replaced with theqiskit.circuit.library.WeightedAdder.num_ancillasattribute which is consistent with other circuit libraries' APIs.The following legacy methods of the
qiskit.quantum_info.Pauliclass have been deprecated. See the method documentation for replacement use in the updated Pauli class.Using a
listornumpy.ndarrayas thechannelortargetargument for theqiskit.quantum_info.process_fidelity(),qiskit.quantum_info.average_gate_fidelity(),qiskit.quantum_info.gate_error(), andqiskit.quantum_info.diamond_norm()functions has been deprecated and will not be supported in a future release. The inputs should instead be aGateor aBaseOperatorsubclass object (eg.Operator,Choi, etc.)Accessing references from
QubitandClbitinstances to their containing registers via theregisterorindexproperties has been deprecated and will be removed in a future release. Instead,Registerobjects can be queried to find theBitobjects they contain.The current functionality of the
qiskit.visualization.pulse_drawer()function is deprecated and will be replaced byqiskit.visualization.pulse_drawer_v2()(which is not backwards compatible) in a future release.The use of methods inherited from the
settype on the output of theparametersattribute (which used to be aset) of theQuantumCircuitclass are deprecated and will be removed in a future release. This includes the methods from theadd(),difference(),difference_update(),discard(),intersection(),intersection_update(),issubset(),issuperset(),symmetric_difference(),symmetric_difference_update(),union(),update(),__isub__()(which is the-=operator), and__ixor__()(which is the^=operator).The name of the first (and only) positional argument for the
qiskit.circuit.QuantumCircuit.bind_parameters()method has changed fromvalue_dicttovalues. The passing an argument in with the namevalues_dictis deprecated and will be removed in future release. For example, if you were previously callingbind_parameters()with a call like:bind_parameters(values_dict={})this is deprecated and should be replaced bybind_parameters(values={})or even better just pass the argument positionallybind_parameters({}).The name of the first (and only) positional argument for the
qiskit.circuit.QuantumCircuit.assign_parameters()method has changed fromparam_dicttoparameters. Passing an argument in with the nameparam_dictis deprecated and will be removed in future release. For example, if you were previously callingassign_parameters()with a call like:assign_parameters(param_dict={})this is deprecated and should be replaced byassign_parameters(values={})or even better just pass the argument positionallyassign_parameters({}).
பிழை திருத்தங்கள்¶
Fixed an issue where the
execute()function would raiseQiskitErrorexception when aParameterVectorobject was passed in for theparameter_bindkwarg. parameter. For example, it is now possible to call something like:execute(circuit, backend, parameter_binds=[{pv1: [...], pv2: [...]}])
where
pv1andpv2areParameterVectorobjects. Fixed #5467Fixed an issue with the labels of parametric pulses in the
PulseQobjInstructionclass were not being properly set as they are with sampled pulses. This also means that pulse names that are imported from thePulseDefaultsreturned by aBackend, such asx90,x90m, etc, will properly be set. Fixed #5363Fixed an issue where unbound parameters only occurring in the
global_phaseattribute of aQuantumCircuitobject would not show in theparametersattribute and could not be bound. Fixed #5806The
calibrationsattribute ofQuantumCircuitobjects are now preserved when the+=(ie theextend()method) and the+(ie thecombine()method) are used. Fixed #5930 and #5908The
namesetter method of classRegister(which is the parent class ofQuantumRegisterandClassicalRegister) previously did not check if the assigned string was a valid register name as per the OpenQASM specification. This check was previously only performed when the name was specified in the constructor, this has now been fixed so that setting thenameattribute directly with an invalid value will now also raise an exception. Fixed #5461Fixed an issue with the
qiskit.visualization.circuit_drawer()function andqiskit.circuit.QuantumCircuit.draw()method when visualizing aQuantumCircuitwith aGatethat has a classical condition after aMeasurethat used the sameClassicalRegister, it was possible for the conditionalGateto be displayed to the left of theMeasure. Fixed #5387In the transpiler pass
qiskit.transpiler.passes.CSPLayouta bias towards lower numbered qubits could be observed. This undesireable bias has been fixed by shuffling the candidates to randomize the results. Furthermore, the usage of theCSPLayoutpass in thepreset_passmanagers(for level 2 and 3) has been adjusted to use a configured seed if theseed_transpilerkwarg is set whentranspile()is called. Fixed #5990Fixes a bug where the
channelsfield for aPulseBackendConfigurationobject was not being included in the output of theqiskit.providers.models.PulseBackendConfiguration.to_dictmethod. Fixed #5579Fixed the
'circular'entanglement in theqiskit.circuit.library.NLocalcircuit class for the edge case where the circuit has the same size as the entanglement block (e.g. a two-qubit circuit and CZ entanglement gates). In this case there should only be one entanglement gate, but there was accidentially added a second one in the inverse direction as the first. Fixed Qiskit/qiskit-aqua#1452Fixed the handling of breakpoints in the
PiecewisePolynomialPauliRotationsclass in theqiskit.circuit.library. Now fornintervals,n+1breakpoints are allowed. This enables specifying another end interval other than \(2^\text{num qubits}\). This is important because from the end of the last interval to \(2^\text{num qubits}\) the function is the identity.Fixed an issue in the
qiskit.circuit.library.Permutationcircuit class where some permutations would not be properly generated. This issue could also effectqiskit.circuit.library.QuantumVolumeif it were called with classical_permutation=False`. Fixed #5812Fixed an issue where generating QASM output with the
qasm()method for aQuantumCircuitobject that has aControlledGatewith an open control the output would be as if all controls were closed independent of the specified control state. This would result in a different circuit being created fromfrom_qasm_str()if parsing the generated QASM.This was fixed by updating the QASM output from
qasm()by defining a composite gate which usesXGateto implement the open controls. The composite gate is named like<original_gate_name>_o<ctrl_state>whereostands for open control andctrl_stateis the integer value of the control state. Fixed #5443Fixed an issue where binding
Parameterobjects in aQuantumCircuitwith theparameter_bindsin theexecutefunction would cause all the boundQuantumCircuitobjects would have the samename, which meant the result names were also not unique. This fix causes thebind_parameters()andassign_parameters()to assign a unique circuit name wheninplace=Falseas:<base name>-<class instance no.>[-<pid name>]
where
<base name>is the name supplied by the "name" kwarg, otherwise it defaults to "circuit". The class instance number gets incremented every time an instance of the class is generated.<pid name>is appended if called outside the main process. Fixed #5185Fixed an issue with the
scheduler()function where it would raise an exception if an input circuit contained an unboundQuantumCircuitobject. Fixed #5304Fixed an issue in the
qiskit.transpiler.passes.TemplateOptimizationtranspiler passes where template circuits that contained unboundParameterobjects would crash under some scenarios if the parameters could not be bound during the template matching. Now, if theParameterobjects can not be bound templates with unboundParameterare discarded and ignored by theTemplateOptimizationpass. Fixed #5533Fixed an issue with the
qiskit.visualization.timeline_drawer()function where classical bits were inproperly handled. Fixed #5361Fixed an issue in the
qiskit.visualization.circuit_drawer()function and theqiskit.circuit.QuantumCircuit.draw()method whereDelayinstructions in aQuantumCircuitobject were not being correctly treated as idle time. So when theidle_wireskwarg was set toFalsethe wires with theDelayobjects would still be shown. This has been fixed so that the idle wires are removed from the visualization if there are onlyDelayobjects on a wire.Previously, when the option
layout_methodkwarg was provided to thetranspile()function and theoptimization_levelkwarg was set to >= 2 so that the passqiskit.transpiler.passes.CSPLayoutwould run, ifCSPLayoutfound a solution then the method inlayout_methodwas not executed. This has been fixed so that if specified, thelayout_methodis always honored. Fixed #5409When the argument
coupling_map=None(either set explicitly, set implicitly as the default value, or via thebackendkwarg), the transpiling process was not "embedding" the circuit. That is, even when aninitial_layoutwas specified, the virtual qubits were not assigned to physical qubits. This has been fixed so that now, theqiskit.compiler.transpile()function honors theinitial_layoutargument by embedding the circuit:from qiskit import QuantumCircuit, QuantumRegister from qiskit.compiler import transpile qr = QuantumRegister(2, name='qr') circ = QuantumCircuit(qr) circ.h(qr[0]) circ.cx(qr[0], qr[1]) transpile(circ, initial_layout=[1, 0]).draw(output='mpl')
If the
initial_layoutrefers to more qubits than in the circuit, the transpiling process will extended the circuit with ancillas.from qiskit import QuantumCircuit, QuantumRegister from qiskit.compiler import transpile qr = QuantumRegister(2, name='qr') circ = QuantumCircuit(qr) circ.h(qr[0]) circ.cx(qr[0], qr[1]) transpile(circ, initial_layout=[4, 2], coupling_map=None).draw()
ancilla_0 -> 0 ────────── ancilla_1 -> 1 ────────── ┌───┐ qr_1 -> 2 ─────┤ X ├ └─┬─┘ ancilla_2 -> 3 ───────┼── ┌───┐ │ qr_0 -> 4 ┤ H ├──■── └───┘Fixed #5345
A new kwarg,
user_cost_dicthas been added to the constructor for theqiskit.transpiler.passes.TemplateOptimizationtranspiler pass. This enables users to provide a custom cost dictionary for the gates to the underlying template matching algorithm. For example:from qiskit.transpiler.passes import TemplateOptimization cost_dict = {'id': 0, 'x': 1, 'y': 1, 'z': 1, 'h': 1, 't': 1} pass = TemplateOptimization(user_cost_dict=cost_dict)
An issue when passing the
Countsobject returned byget_counts()tomarginal_counts()would produce an improperly formattedCountsobject with certain inputs has been fixed. Fixes #5424Improved the allocation of helper qubits in
PolynomialPauliRotationsandPiecewiseLinearPauliRotationswhich makes the implementation of these circuit more efficient. Fixed #5320 and #5322Fix the usage of the allocated helper qubits in the
MCXGatein theWeightedAdderclass. These were previously allocated but not used prior to this fix. Fixed #5321In a number of cases, the
latexoutput method for theqiskit.visualization.circuit_drawer()function and thedraw()method did not display the gate name correctly, and in other cases, did not include gate parameters where they should be. Now the gate names will be displayed the same way as they are displayed with themploutput method, and parameters will display for all the gates that have them. In addition, some of the gates did not display in the correct form, and these have been fixed. Fixes #5605, #4938, and #3765Fixed an issue where, if the
qiskit.circuit.Instruction.to_instruction()method was used on a subcircuit which contained classical registers and thatInstructionobject was then added to aQuantumCircuitobject, then the output from theqiskit.visualization.circuit_drawer()function and theqiskit.circuit.QuantumCircuit.draw()method would in some instances display the subcircuit to the left of a measure when it should have been displayed to the right. Fixed #5947Fixed an issue with
Delayobjects in aQuantumCircuitwhereqiskit.compiler.transpile()would not be convert the units of theDelayto the units of theBackend, if thebackendkwarg is set ontranspile(). This could result in the wrong behavior because of a unit mismatch, for example running:from qiskit import transpile, execute from qiskit.circuit import QuantumCircuit qc = QuantumCircuit(1) qc.delay(100, [0], unit='us') qc = transpile(qc, backend) job = execute(qc, backend)
would previously have resulted in the backend delay for 100 timesteps (each of duration dt) rather than expected (100e-6 / dt) timesteps. This has been corrected so the
qiskit.compiler.transpile()function properly converts the units.
பிற குறிப்புகள்¶
The snapshots of all the fake/mock backends in
qiskit.test.mockhave been updated to reflect recent device changes. This includes a change in thebasis_gatesattribute for theBackendConfigurationto['cx', 'rz', 'sx', 'x', 'id'], the addition of areadout_lengthproperty to the qubit properties in theBackendProperties, and updating thePulseDefaultsso that all the mock backends support parametric pulse basedInstructionScheduleMapinstances.
Aer 0.8.0¶
முன்னுரை¶
The 0.8 release includes several new features and bug fixes. The
highlights for this release are: the introduction of a unified
AerSimulator backend for running circuit
simulations using any of the supported simulation methods; a simulator
instruction library (qiskit.providers.aer.library)
which includes custom instructions for saving various kinds of simulator
data; MPI support for running large simulations on a distributed
computing environment.
புதிய அம்சங்கள்¶
இந்த வெளியீட்டில் பைதான் 3.9 ஆதரவு சேர்க்கப்பட்டுள்ளது. நீங்கள் தற்பொழுது Qiskit Aer மூலத்திலிருந்து கட்டமைக்காமல் பைதான் 3.9 பயன்படுத்தி இயக்கலாம்.
CMake கொடியை ` ` DISABLE_CONAN ` ` (default= ` ` OFF ` `) சேர். மூலத்திலிருந்து நிறுவி, ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `. இது ஒரு சூழல் மாறாக ` DISABLE_CONAN ` `, இது CMake கொடியை மேல் எடுத்துக் கொள்ளும். இது AER கட்டுவதற்கு அதிகாரப்பூர்வை அளிக்கவில்லை. இப்படி, பயனர் அனைத்து தேவையான நூலகங்களையும், ஒத்திசைவு கோப்புகளையும் வழங்குவதற்கு பொறுப்பேற்றது.
This release includes support for building qiskit-aer with MPI support to run large simulations on a distributed computing environment. See the contributing guide for instructions on building and running in an MPI environment.
It is now possible to build qiskit-aer with CUDA enabled in Windows. See the contributing guide for instructions on building from source with GPU support.
When building the qiskit-aer Python extension from source several build dependencies need to be pre-installed to enable C++ compilation. As a user convenience when building the extension any of these build dependencies which were missing would be automatically installed using
pipprior to the normalsetuptoolsinstallation steps, however it was previously was not possible to avoid this automatic installation. To solve this issue a new environment variableDISABLE_DEPENDENCY_INSTALLhas been added. If it is set to1orONwhen building the python extension from source this will disable the automatic installation of these missing build dependencies.Adds support for optimized N-qubit Pauli gate (
qiskit.circuit.library.PauliGate) to theStatevectorSimulator,UnitarySimulator, and the statevector and density matrix methods of theQasmSimulatorandAerSimulator.The
run()method for theAerSimulator,QasmSimulator,StatevectorSimulator, andUnitarySimulatorbackends now takes aQuantumCircuit(or a list ofQuantumCircuitobjects) as it's input. The previousQasmQobjobject is still supported for now, but will be deprecated in a future release.For an example of how to use this see:
from qiskit import transpile, QuantumCircuit from qiskit.providers.aer import Aer backend = Aer.get_backend('aer_simulator') circuit = QuantumCircuit(2) qc.h(0) qc.cx(0, 1) qc.measure_all() tqc = transpile(circuit, backend) result = backend.run(tqc, shots=4096).result()
The
run()method for thePulseSimulatorbackend now takes aSchedule(or a list ofScheduleobjects) as it's input. The previousPulseQobjobject is still supported for now, but will be deprecated in a future release.Adds the new
AerSimulatorsimulator backend supporting the following simulation methodsautomaticstatevectorstabilizerdensity_matrixmatrix_product_stateunitarysuperop
The default automatic method will automatically choose a simulation method separately for each run circuit based on the circuit instructions and noise model (if any). Initializing a simulator with a specific method can be done using the method option.
GPU simulation for the statevector, density matrix and unitary methods can be enabled by setting the
device='GPU'backend option.Note that the
unitaryandsuperopmethods do not support measurement as they simulate the unitary matrix or superoperator matrix of the run circuit so one of the newsave_unitary(),save_superop(), orsave_state()instructions must be used to save the simulator state to the returned results. Similarly state of the other simulations methods can be saved using the appropriate instructions. See theqiskit.providers.aer.libraryAPI documents for more details.Note that the
AerSimulatorsimulator superceds theQasmSimulator,StatevectorSimulator, andUnitarySimulatorbackends which will be deprecated in a future release.Updates the
AerProviderclass to include multipleAerSimulatorbackends preconfigured for all available simulation methods and simulation devices. The new backends can be accessed through the provider interface using the names"aer_simulator""aer_simulator_statevector""aer_simulator_stabilizer""aer_simulator_density_matrix""aer_simulator_matrix_product_state""aer_simulator_extended_stabilizer""aer_simulator_unitary""aer_simulator_superop"
Additional if Aer was installed with GPU support on a compatible system the following GPU backends will also be available
"aer_simulator_statevector_gpu""aer_simulator_density_matrix_gpu""aer_simulator_unitary_gpu"
உதாரணத்திற்கு:
from qiskit import Aer # Get the GPU statevector simulator backend backend = Aer.get_backend('aer_simulator_statevector_gpu')
Added a new
norm estimationmethod for performing measurements when using the"extended_stabilizer"simulation method. This norm estimation method can be used by passing the following options to theAerSimulatorandQasmSimulatorbackendssimulator = QasmSimulator( method='extended_stabilizer', extended_stabilizer_sampling_method='norm_estimation')
The norm estimation method is slower than the alternative
metropolisorresampled_metropolisoptions, but gives better performance on circuits with sparse output distributions. See the documentation of theQasmSimulatorfor more information.Adds instructions for saving the state of the simulator in various formats. These instructions are
These instructions can be appended to a quantum circuit by using the
save_density_matrix,save_matrix_product_state,save_stabilizer,save_state,save_statevector,save_statevector_dict,save_unitarycircuit methods which are added toQuantumCircuitwhen importing Aer.See the
qiskit.providers.aer.libraryAPI documentation for details on method compatibility for each instruction.Note that the snapshot instructions
SnapshotStatevector,SnapshotDensityMatrix,SnapshotStabilizerare still supported but will be deprecated in a future release.Adds
qiskit.providers.aer.library.SaveExpectationValueandqiskit.providers.aer.library.SaveExpectationValueVariancequantum circuit instructions for saving the expectation value \(\langle H\rangle = Tr[H\rho]\), or expectation value and variance \(Var(H) = \langle H^2\rangle - \langle H\rangle^2\), of a Hermitian operator \(H\) for the simulator state \(\rho\). These instruction can be appended to a quantum circuit by using thesave_expectation_valueandsave_expectation_value_variancecircuit methods which is added toQuantumCircuitwhen importing Aer.Note that the snapshot instruction
SnapshotExpectationValue, is still supported but will be deprecated in a future release.Adds
qiskit.providers.aer.library.SaveProbabilitiesandqiskit.providers.aer.library.SaveProbabilitiesDictquantum circuit instruction for saving all measurement outcome probabilities for Z-basis measurements of the simualtor state. These instruction can be appended to a quantum circuit by using thesave_probabilitiesandsave_probabilities_dictcircuit methods which is added toQuantumCircuitwhen importing Aer.Note that the snapshot instruction
SnapshotProbabilities, is still supported but will be deprecated in a future release.Adds
qiskit.providers.aer.library.SaveAmplitudesandqiskit.providers.aer.library.SaveAmplitudesSquaredcircuit instructions for saving select complex statevector amplitudes, or select probabilities (amplitudes squared) for supported simulation methods. These instructions can be appended to a quantum circuit by using thesave_amplitudesandsave_amplitudes_squaredcircuit methods which is added toQuantumCircuitwhen importing Aer.Adds instructions for setting the state of the simulators. These instructions must be defined on the full number of qubits in the circuit. They can be applied at any point in a circuit and will override the simulator state with the one specified. Added instructions are
These instruction can be appended to a quantum circuit by using the
set_density_matrix,set_stabilizer,set_statevector,set_unitarycircuit methods which are added toQuantumCircuitwhen importing Aer.See the
qiskit.providers.aer.libraryAPI documentation for details on method compatibility for each instruction.Added support for diagonal gates to the
"matrix_product_state"simulation method.Added support for the
initializeinstruction to the"matrix_product_state"simulation method.
தெரிந்த சிக்கல்கள்¶
There is a known issue where the simulation of certain circuits with a Kraus noise model using the
"matrix_product_state"simulation method can cause the simulator to crash. Refer to #306 for more information.
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
The minimum version of Conan has been increased to 1.31.2. This was necessary to fix a compatibility issue with newer versions of the urllib3 (which is a dependency of Conan). It also adds native support for AppleClang 12 which is useful for users with new Apple computers.
pybind11minimum version required is 2.6 instead of 2.4. This is needed in order to support CUDA enabled compilation in Windows.Cython has been removed as a build dependency.
Removed x90 gate decomposition from noise models that was deprecated in qiskit-aer 0.7. This decomposition is now done by using regular noise model basis gates and the qiskit transpiler.
The following options for the
"extended_stabilizer"simulation method have changed.extended_stabilizer_measure_sampling: This option has been replaced by the optionsextended_stabilizer_sampling_method, which controls how we simulate qubit measurement.extended_stabilizer_mixing_time: This option has been renamed asextended_stabilizer_metropolis_mixing_timeto clarify it only applies to themetropolisandresampled_metropolissampling methods.extended_stabilizer_norm_estimation_samples: This option has been renamed toextended_stabilizer_norm_estimation_default_samples.
One additional option,
extended_stabilizer_norm_estimation_repetitionshas been added, whih controls part of the behaviour of the norm estimation sampling method.
தேய்மான குறிப்புகள்¶
Python 3.6 support has been deprecated and will be removed in a future release. When support is removed you will need to upgrade the Python version you're using to Python 3.7 or above.
பிழை திருத்தங்கள்¶
பிழையை சரிசெய்கிறது: வர்க்கம்: ~ qiskit.providers.aer.AerProvider ஐப் பயன்படுத்தி திரும்பிய பின்தளத்தில் விருப்பங்கள் அமைக்கப்படுகின்றன: மெத்:` ~ qiskit.providers.aer.QasmSimulator.set_options` வழங்குநரில் சேமிக்கப்பட்டு அடுத்தடுத்த அழைப்புகளுக்கு தொடர்ந்து இருக்கும் to: meth: ~ qiskit.providers.aer.AerProvider.get_backend அதே பெயரிடப்பட்ட பின்தளத்தில். இப்போது ஒவ்வொரு அழைப்பும் மற்றும்: மெத்: ~ qiskit.providers.aer.AerProvider.backends கட்டமைக்கக்கூடிய சிமுலேட்டர் பின்தளத்தில் ஒரு புதிய நிகழ்வை வழங்குகிறது.
பிழை செய்தியில் பிழை தகவல் திரும்பி திரும்பும் போது ஒரு சுற்றுச்சொல் ஆதரிக்கப்படாத உரையாடல் கட்டளையை கொண்டிருக்கும். முன்னதாக சில ஆதரவுப் பரிந்துரைகள் பிழை செய்திகளில் பட்டியலிடப்பட்டன.
அமைப்பில் சிக்கலை சரிசெய்கிறது: வர்க்கம்: ~ qiskit.providers.aer.QasmSimulator அடிப்படை வாயில்கள்` " முறை " மற்றும் " சத்தம்_மாடல் " விருப்பங்களை ஒன்றாகப் பயன்படுத்தும் போது, அவற்றைப் பயன்படுத்தி உருவாக்கப்பட்ட சிமுலேட்டருடன் பயன்படுத்தும் போது: மெத் : `~ qiskit.providers.aer.QasmSimulator.from_backend. இப்போது பட்டியலிடப்பட்ட அடிப்படை வாயில்கள் பின்தளத்தில் உள்ளமைவு, உருவகப்படுத்துதல் முறை மற்றும் இரைச்சல் மாதிரி அடிப்படை வாயில்கள் ஆதரிக்கும் வாயில்களின் குறுக்குவெட்டாக இருக்கும். இரைச்சல் மாதிரி அடிப்படை வாயில்கள் மற்றும் சிமுலேட்டர் அடிப்படை வாயில்கள் வெட்டுவது காலியாக இருந்தால் எச்சரிக்கை பதிவு செய்யப்படும்.
Fix bug where the
"sx"`gateSXGatewas not listed as a supported gate in the C++ code, inStateOpSetofmatrix_product_state.hp.`` "சி.எஸ்.எக்ஸ்" ``, `` "கியூ 2" ``, `` "கியூ 3" `` ஆகியவை `` "அடர்த்தி_மாட்ரிக்ஸ்" `` முறை: வகுப்பின்: ~ முறைக்கு ஆதரிக்கப்பட்ட அடிப்படை வாயில்களாக தவறாக பட்டியலிடப்பட்ட பிழையை சரிசெய்யவும். qiskit.providers.aer.QasmSimulator.
Fix bug where parameters were passed incorrectly between functions in
matrix_product_state_internal.cpp, causing wrong simulation, as well as reaching invalid states, which in turn caused an infinite loop.Fixes a bug that resulted in
c_ifnot working when the width of the conditional register was greater than 64. See #1077.Fixes a bug #1153) where noise on conditional gates was always being applied regardless of whether the conditional gate was actually applied based on the classical register value. Now noise on a conditional gate will only be applied in the case where the conditional gate is applied.
ஒரு பிழை நீக்கப்பட்ட OpenMP கொள்கையை அமைக்கும் போது உண்மையில் அமைக்கப்பட்டிருக்கும்.
QasmSimulator யின் மாட்ரிக்ஸ் உற்பத்தி மாநில முறையில் தட்டை பயன்படுத்தும்போது ஒரு பிழை நீக்கு.
திருத்தப்பட்ட பிழை #1126: ஒற்றை Qubit-ன் அளவீட்டை அறிக்கையளிப்பதில் பிழை. அளவிடப்பட்ட மதிப்பை வெளியீட்டு தரவு கட்டமைப்பிற்கு நகலெடுக்கும் போது பிழை ஏற்பட்டது.
MPS இல், apply_kraus ஆனது உள் குவிட்டுகளுக்குப் பதிலாக, அளவுரு குவிட்டுகளில் உள்ளீட்டு பிட்களில் நேரடியாக இயங்குகிறது. எம். பி. எஸ் வழிமுறையில், குவிட்கள் தொடர்ந்து சுற்றி வருகின்றன, எனவே அனைத்து செயல்பாடுகளும் உள் குவிட்டுகளுக்கு பயன்படுத்தப்பட வேண்டும்.
MPS:: sample_measure ஐத் தொடங்கும்போது, நாம் முதலில் qitsm_controller இல் உள்ள அனுமானமாக இருப்பதால், முன்னிருப்புகளை வரிசைப்படுத்த வேண்டும். இது move_all_qubits_to_sorted_ordering முறையைத் தொடங்குவதன் மூலம் செய்யப்படுகிறது. இது மாதிரி_அளவு_பயன்படுத்தல்_அறிவிப்பு_ அளவீட்டில் சரியானது, ஆனால் மாதிரி_அளவு_பயன்படுத்தல்_செயல்பாடுகளில் காணவில்லை.
Fixes bug with the
from_backend()method of theQasmSimulatorthat would set thelocalattribute of the configuration to the backend value rather than always being set toTrue.பிழைகளை சரிசெய்கிறது: மெத்: ~ qiskit.providers.aer.noise.NoiseModel.from_backend மற்றும்: meth:` ~ qiskit.providers.aer.QasmSimulator.from_backend` where: attr: ~ qiskit.providers.aer. அடிப்படை வாயில் தொகுப்பு ` ['ஐடி', 'ஆர்.எஸ்', 'எஸ்.எக்ஸ்', 'எக்ஸ்', 'சிஎக்ஸ்'] `` ஐபிஎம்யூ சாதனங்களுக்கு NoiseModel.basis_gates` தவறாக அமைக்கப்பட்டது. இப்போது சத்தம் மாதிரியில் எப்போதும் பின்தளத்தில் அடிப்படை வாயில்கள் போன்ற அடிப்படை வாயில்கள் இருக்கும், அந்த அறிவுறுத்தல்கள் சத்தம் மாதிரியில் பிழைகள் உள்ளதா இல்லையா என்பதைப் பொருட்படுத்தாமல்.
Fixes an issue where the Extended "extended_stabilizer" simulation method would give incorrect results on quantum circuits with sparse output distributions. Refer to #306 for more information and examples.
Ignis 0.6.0¶
புதிய அம்சங்கள்¶
The
qiskit.ignis.mitigation.expval_meas_mitigator_circuits()function has been improved so that the number of circuits generated by the function used for calibration by the CTMP method are reduced from \(O(n)\) to \(O(\log{n})\) (where \(n\) is the number of qubits).
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
The
qiskit.ignis.verification.randomized_benchmarking_seq()function is now using the upgraded CNOTDihedral class,qiskit.ignis.verification.CNOTDihedral, which enables performing CNOT-Dihedral Randomized Benchmarking on more than two qubits.The python package
retworkxis now a requirement for installing qiskit-ignis. It replaces the previous usage ofnetworkx(which is no longer a requirement) to get better performance.The
scikit-learndependency is no longer required and is now an optional requirement. If you're using the IQ measurement discriminators (IQDiscriminationFitter,LinearIQDiscriminationFitter,QuadraticIQDiscriminationFitter, orSklearnIQDiscriminator) you will now need to manually install scikit-learn, either by runningpip install scikit-learnor when you're also installing qiskit-ignis withpip install qiskit-ignis[iq].
பிழை திருத்தங்கள்¶
Fixed an issue in the expectation value method
expectation_value(), for the error mitigation classesTensoredExpvalMeasMitigatorandCTMPExpvalMeasMitigatorif thequbitskwarg was not specified it would incorrectly use the total number of qubits of the mitigator, rather than the number of classical bits in the count dictionary leading to greatly reduced performance. Fixed #561வர்க்கத்தின் `` "ஆட்டோ" `` முறையை சரிசெய்யவும்: ~ qiskit.ignis.verification.tomography.TomographyFitter ,: class:` ~ qiskit.ignis.verification.tomography.StateTomographyFitter`, மற்றும்: class: ~ qiskit.ignis.verification.tomography.ProcessTomographyFitter ஐ CVXPY நிறுவப்பட்டிருந்தால் `` "cvx" `` ஐ மட்டுமே பயன்படுத்த * மற்றும் * SCS ஐத் தவிர மூன்றாம் தரப்பு SDP தீர்வி கிடைக்கிறது. ஏனென்றால், எஸ்சிஎஸ் தீர்வி மற்ற தீர்வி முறைகளை விட குறைந்த துல்லியத்தன்மையைக் கொண்டுள்ளது மற்றும் பெரும்பாலும் அடர்த்தி மேட்ரிக்ஸ் அல்லது சோய்-மேட்ரிக்ஸை முழுமையாக நேர்மறையானது அல்ல, மேலும்: func: qiskit.quantum_info.state_fidelity அல்லது: func: உடன் பயன்படுத்தும்போது சரிபார்ப்பில் தோல்வியடைகிறது.
Aqua 0.9.0¶
This release officially deprecates the Qiskit Aqua project, in the future
(no sooner than 3 months from this release) the Aqua project will have it's
final release and be archived. All the functionality that qiskit-aqua provides
has been migrated to either new packages or to other qiskit packages. The
application modules that are provided by qiskit-aqua have been split into
several new packages: qiskit-optimization, qiskit-nature,
qiskit-machine-learning, and qiskit-finance. These packages can be
installed by themselves (via the standard pip install command,
ie pip install qiskit-nature) or with the rest of the Qiskit metapackage as
optional extras (ie, pip install 'qiskit[finance,optimization]' or
pip install 'qiskit[all]'. The core building blocks for algorithms and the
operator flow now exist as part of qiskit-terra at qiskit.algorithms and
qiskit.opflow. Depending on your existing usage of Aqua you should either
use the application packages or the new modules in Qiskit Terra.
For more details on how to migrate from using Qiskit Aqua you can refer to the Qiskit Aqua Migration Guide.
IBM Q Provider 0.12.2¶
எந்த மாற்றங்களும் இல்லை
Qiskit 0.24.1¶
Terra 0.16.4¶
எந்த மாற்றங்களும் இல்லை
Aer 0.7.6¶
எந்த மாற்றங்களும் இல்லை
Ignis 0.5.2¶
எந்த மாற்றங்களும் இல்லை
Aqua 0. 8. 2¶
எந்த மாற்றங்களும் இல்லை
IBM Q Provider 0.12.2¶
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
qiskit.providers.ibmq.IBMQBackend.defaults()now returns the pulse defaults for the backend if the backend supports pulse. However, your provider may not support pulse even if the backend does. Theopen_pulseflag in backend configuration indicates whether the provider supports it.
Qiskit 0.24.0¶
Terra 0.16.4¶
எந்த மாற்றங்களும் இல்லை
Aer 0.7.6¶
புதிய அம்சங்கள்¶
இது Qiskit Aer-ன் முதல் வெளியீடாகும், இது முன்னரே தொகுக்கப்பட்ட பைனரிகளை PyPi-க்கு லினக்ஸிற்காக aarch64 (arm64) இல் வெளியிடுகிறது. இந்த வெளியீட்டில் இருந்து லினக்ஸ் aarch 64 தொகுப்புகள் வெளியிடப்பட்டு ஆதரிக்கப்படும்.
பிழை திருத்தங்கள்¶
பிழை திருத்தம் #1153 கிளாசிக்கல் பதிவு மதிப்பின் அடிப்படையில் நிபந்தனை வாயில் உண்மையில் பயன்படுத்தப்பட்டதா என்பதைப் பொருட்படுத்தாமல் நிபந்தனை வாயில்களில் இரைச்சல் எப்போதும் பயன்படுத்தப்படுகிறது. இப்போது நிபந்தனை வாயிலில் இரைச்சல் நிபந்தனை வாயில் பயன்படுத்தப்படும் போது மட்டுமே பயன்படுத்தப்படும்.
திருத்தப்பட்ட பிழை #1126: ஒற்றை Qubit-ன் அளவீட்டை அறிக்கையளிப்பதில் பிழை. அளவிடப்பட்ட மதிப்பை வெளியீட்டு தரவு கட்டமைப்பிற்கு நகலெடுக்கும் போது பிழை ஏற்பட்டது.
முன்னதாக Aer பின்தளத்தில் பொருள்கள் ஆதரிக்கப்படுவதாகக் கூறப்படும் இயல்புநிலை அறிக்கையிடப்பட்ட எண்ணிக்கையிலான Qubit-கள் மற்றும் சிமுலேட்டர் உண்மையில் இயங்கும் அதிகபட்ச எண்ணிக்கையிலான Qubit-க்கு இடையில் பொருந்தவில்லை. அதிகபட்ச எண்ணிக்கையிலான Qubitகளைக் கணக்கிடுவதற்குப் பயன்படுத்தப்படும் Python குறியீட்டிற்கும், கிடைக்கக்கூடிய நினைவகத்தின் அடிப்படையில் அதிகபட்ச எண்ணிக்கையிலான Qubitகளுக்கான இயக்க நேர சோதனைக்கு பயன்படுத்தப்படும் C++ குறியீட்டிற்கும் இடையிலான பொருந்தாத காரணத்தினால் இது ஏற்பட்டது. இது சரியானது, எனவே இயல்புநிலையாக இப்போது கிடைக்கக்கூடிய அனைத்து கணினி நினைவகத்திலும் பொருந்தக்கூடிய சுற்றுகளை இயக்க Aer பின்தளத்தில் அனுமதிக்கும். திருத்துவது #1114
எந்த மாற்றங்களும் இல்லை
Ignis 0.5.2¶
எந்த மாற்றங்களும் இல்லை
Aqua 0. 8. 2¶
எந்த மாற்றங்களும் இல்லை
IBM Q வழங்கி 0. 12. 0¶
முன்னுரை¶
:meth:` qiskit.preers.ibmq.IBMQBackend.run ` method now takes one or more :class:` ~ qiskit.circuit.QuantumCircuit ` or :class:` ~ qiskit.pulse.Schedule . Use of :class: ~ qiskit.QasmQobj ` and :class:` ~ qiskit.Qobj.PulseQobj ` is now deprecated. இயங்கும் கட்டமைப்பு விருப்பங்கள், போன்றவற்றின் எண்ணிக்கை, :meth:` ~ qiskit.preers.ibmq.IBMQBackend.run ` method, or the :meth:` qiskit.preers.ibmq.IBMQBackend.set_options ` method. முன்னாள் வேலைகளுக்கான ஒரு முறை அமைப்பாக பயன்படுத்தப்படுகிறது, மற்றும் பின்னணியில் அனுப்பப்பட்ட அனைத்து வேலைகளுக்கான பின்னணி. இரண்டு இடங்களிலும் ஒரு விருப்பத்தேர்வு அமைக்கப்பட்டால், :meth:` ~ qiskit.देगा என்ற மதிப்பு அமைக்கப்பட்டுள்ளது.
IBM Quantum credentials இப்போது ` ` qiskitrc ` ` கோப்பிலிருந்து 'ibmq' ஆரம்பித்தல் மட்டுமே ஏற்றப்படுகின்றன.
புதிய அம்சங்கள்¶
இந்த வெளியீட்டில் பைதான் 3.9 ஆதரவு சேர்க்கப்பட்டுள்ளது. நீங்கள் தற்பொழுது Qiskit IBMQ வழங்குபவர் பைதான் 3.9 பயன்படுத்தி இயக்கலாம்.
: meth: qiskit.providers.ibmq.AccountProvider.backends இப்போது ஒரு புதிய அளவுரு` min_num_qubits` ஐக் கொண்டுள்ளது, இது குறைந்தபட்ச எண்ணிக்கையிலான குவிட்களால் வடிகட்ட உங்களை அனுமதிக்கிறது.
qiskit.providers.ibmq.IBMQBackend.run()method now takes one or moreQuantumCircuitorSchedule. Runtime configuration options, such as the number of shots, can be set via either therun()method, or theqiskit.providers.ibmq.IBMQBackend.set_options()method. The former is used as a one-time setting for the job, and the latter for all jobs sent to the backend. If an option is set in both places, the value set inrun()takes precedence. For example:from qiskit import IBMQ, transpile from qiskit.test.reference_circuits import ReferenceCircuits provider = IBMQ.load_account() backend = provider.get_backend('ibmq_vigo') circuits = transpile(ReferenceCircuits.bell(), backend=backend) default_shots = backend.options.shots # Returns the backend default of 1024 shots. backend.set_options(shots=2048) # All jobs will now have use 2048 shots. backend.run(circuits) # This runs with 2048 shots. backend.run(circuits, shots=8192) # This runs with 8192 shots. backend.run(circuits) # This again runs with 2048 shots.
: class: qiskit.providers.ibmq.experiment.Experiment இல் இப்போது மூன்று கூடுதல் பண்புக்கூறுகள் உள்ளன,` ஹப்`, குழு, மற்றும்` திட்டம்`, அவை பரிசோதனையை உருவாக்க பயன்படும் வழங்குநரை அடையாளம் காணும்.
ஒரு வேலையைப் பயன்படுத்தி சமர்ப்பிக்கும் போது நீங்கள் இப்போது ஒரு `` சோதனை_ஐடி`` ஐ ஒதுக்கலாம்: மெத்: qiskit.providers.ibmq.IBMQBackend.run. ஒரே பரிசோதனையைச் சேர்ந்த வேலைகளின் தொகுப்பை ஒன்றிணைக்க இந்த புதிய புலத்தைப் பயன்படுத்தலாம். மெத்: qiskit.providers.ibmq.IBMQBackendService.jobs` முறையும் `` பரிசோதனை_ஐடி`` மூலம் வடிகட்டலை அனுமதிக்க புதுப்பிக்கப்பட்டது.
:class:` qiskit.रोज़ी. Ibmq.experiment.Experiment ` தற்போது இரண்டு கூடுதல் குணங்கள் கொண்டது:
செங்குத்து அளவு: பரிசோதனை பகிர்ந்துகொள்ளும் அளவு பகிர்ந்தளிக்கப்படுகிறது. இது புதுப்பிக்கலாம்.
உரிமையாளர்: ஆய்வு செய்யப்பட்ட பயனரின் அடையாளம். இது சேவையகத்தால் அமைக்கப்பட்டு புதுப்பிக்கப்படாது.
முறை: மெத்: qiskit.providers.ibmq.experimentervice.ExperimentService.experiment`s இப்போது ஹப்`,` குழு`, மற்றும்` திட்டம்` ஆகியவற்றை முக்கிய வார்த்தைகளை வடிகட்டுவதாக ஏற்றுக்கொள்கிறது.
முறைகள்: மெத்: qiskit.providers.ibmq.experiment.ExperimentService.experiment மற்றும்: மெத்:` qiskit.providers.ibmq.experiment.ExperimentService.analysis_results` இப்போது எண்ணைக் கட்டுப்படுத்த உங்களை அனுமதிக்கும் `` வரம்பு`` அளவுருவை ஆதரிக்கிறது சோதனைகள் மற்றும் பகுப்பாய்வு முடிவுகள் திரும்பின.
முறை: மெத்: qiskit.providers.ibmq.experimentervice.ExperimentService.experiment இப்போது` விலக்கு_மெயின்` மற்றும்` என்னுடைய_ஒரு` ஆகியவற்றை முக்கிய வார்த்தைகளை வடிகட்டுவதாக ஏற்றுக்கொள்கிறது.
முறை: மெத்: qiskit.providers.ibmq.experimentervice.ExperimentService.experiment`s இப்போது விலக்கு_பொது` மற்றும்` பொது_ஒரு` ஆகியவற்றை முக்கிய வார்த்தைகளை வடிகட்டுவதாக ஏற்றுக்கொள்கிறது.
மீத்: qiskit.providers.ibmq.managed.IBMQJobManager.run இப்போது ஒற்றை: வகுப்பை ஏற்றுக்கொள்கிறது:` ~ qiskit.circuit.QuantumCircuit` அல்லது: வகுப்பு: ~ qiskit.pulse.Schedule அவற்றின் பட்டியலுடன் கூடுதலாக.
தி: func: ~ qiskit.providers.ibmq.least_busy செயல்பாடு இப்போது செயல்படும் ஆனால் இடைநிறுத்தப்பட்ட பின்தளத்தில் தவிர்க்கிறது, அதாவது அவை வேலைகளை ஏற்றுக்கொள்கின்றன, ஆனால் செயலாக்கவில்லை.
நீங்கள் இப்பொழுது ஒரு :class:` ~ qiskit.fmq.job.IBMQJ `. Ibmq.job.IBMQJob `. உதாரணமாக, அப்படியே (எ. கா: Qobj தலைப்பில்).
நீங்கள் இப்பொழுது இரண்டு புதிய முறைகளைப் பயன்படுத்தலாம், :meth:` qiskit.देगा நுழைவுக்குள் ./ibmq.AccountProvider.සේවාවන් ` மற்றும் :meth:` qiskit.देगा என்ன சேவைகள் உங்கள் கணக்கில் கிடைக்கப்பெற்றது மற்றும் ஒரு குறிப்பிட்ட சேவையகத்தின் ஒரு நிகழ்வு கிடைக்கும்.
:meth:` qiskit.preers.ibmq.IBMQBackend.రిஸ்பேஷன் ` முறை இப்பொழுது எப்போதும் உங்களிடம் இல்லையென்றால் எப்போதும் ரீதியான நேரத்தைக் காட்டும்.
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
முன்பு திருத்தப்பட்ட முறைகள் மற்றும் அம்சங்களின் எண்ணிக்கை நீக்கப்பட்டுள்ளன, உட்பட:
: மெத்: qiskit.providers.ibmq.job.IBMQJob.to_dict
மெத்: `qiskit.providers.ibmq.job.IBMQJob.from_dict
` Qconfig.py ` ஆதரவு
நெறிமுறைகளை சேர்க்காத ப்ராக்ஸி URL களின் பயன்பாடு
முறைகள்: மெத்: qiskit.providers.ibmq.experiment.ExperimentService.experiment மற்றும்: மெத்:` qiskit.providers.ibmq.experiment.ExperimentService.analysis_results` இப்போது எண்ணைக் கட்டுப்படுத்த உங்களை அனுமதிக்கும் `` வரம்பு`` அளவுருவை ஆதரிக்கிறது சோதனைகள் மற்றும் பகுப்பாய்வு முடிவுகள் திரும்பின.
IBM Quantum credentials இப்போது ` ` qiskitrc ` ` கோப்பிலிருந்து 'ibmq' ஆரம்பித்தல் மட்டுமே ஏற்றப்படுகின்றன. இது ` qiskitrc ` ` கோப்பை மற்ற செயல்பாடுகளுக்கு பயன்படுகிறது.
தேய்மான குறிப்புகள்¶
:class:இன் பயன்பாடு ~ qiskit.qobj.QasmQobj மற்றும்:class:` ~ qiskit.qobj.PulseQobj` இல்:meth: qiskit.providers.ibmq.IBMQBackend.run முறை இப்போது நீக்கப்பட்டது. :class: ~ qiskit.circuit.QuantumCircuit மற்றும்:class:` ~ qiskit.pulse.Schedule` இப்போது அதற்கு பதிலாக பயன்படுத்தப்பட வேண்டும்.
` ` backends ` ` பண்பாடு :class:` qiskit.भविष्य-ibmq.AccountProvider ` ` backend ` ` (sigular) என்று பெயர் மாற்றம் செய்யப்பட்டது. பின்னணி பொருட்களுக்கு, நீங்கள் ` ` backends ` , பயன்படுத்த தொடர முடியும், ஆனால் அது ஒரு எதிர்கால வெளியீட்டில் நீக்கப்படும். :meth: qiskit.देगा நபர். Ibmq.AccountProvider.backends ` method remains unchanged. உதாரணமாக:
backend = provider.backend.ibmq_vigo # This is the new syntax. backend = provider.backends.ibmq_vigo # This is deprecated. backends = provider.backends() # This continues to work as before.
:class:` ~ qiskit.preers.ibmq.job.IBMQJob ` ` client_version ` ` பண்பாடு திருத்தப்பட்டுள்ளது. இருப்பினும், பண்பாட்டு மதிப்பை வாசிக்கலாம்.
`` Validate_qobj`` இன் முக்கிய சொல்: மெத்: qiskit.providers.ibmq.IBMQBackend.run நீக்கப்பட்டது மற்றும் எதிர்கால வெளியீட்டில் அகற்றப்படும். இந்த ஸ்கீமா சரிபார்ப்பை நீங்கள் நம்பினால், கிஸ்கிட் / இப்மக்-ஸ்கீமாக்கள் <https://github.com/Qiskit/ibm-quantum-schemas> _ இலிருந்து ஸ்கீமாக்களை இழுத்து, அதனுடன் உங்கள் பேலோடுகளை நேரடியாக சரிபார்க்க வேண்டும்.
பிழை திருத்தங்கள்¶
வேலை சமர்ப்பிப்பு பாதி வழியில் தோல்வியுற்றால், `` உருவாக்குதல்`` நிலையில் ஒரு வேலையை விடக்கூடிய சிக்கலை சரிசெய்கிறது.
பாரம்பரிய u1, u2 மற்றும் u3 ஆகியவை பின்தளத்தில் அடிப்படை வாயில்களில் சேர்க்கப்படாவிட்டால், ஜூப்பிட்டர் பின்தளத்தில் விட்ஜெட்டைப் பயன்படுத்துவது தோல்வியடையும் சிக்கலை சரிசெய்கிறது. திருத்தங்கள் # 844 <https://github.com/Qiskit/qiskit-ibmq-provider/issues/844>
ஒரு குழந்தை செயல்முறைக்கு `` IBMQRandomService`` உதாரணத்தை அனுப்பும்போது எழுப்பப்படும் எல்லையற்ற சுழற்சியை சரிசெய்கிறது.
சேவையகம் பிழைக் குறியீட்டை வழங்கினால் `` டைப் எர்ரர்`` எழுப்பப்படும் சிக்கலை சரிசெய்கிறது, ஆனால் பதில் தரவு எதிர்பார்த்த வடிவத்தில் இல்லை.
கிஸ்கிட் 0.23.3¶
Terra 0.16.4¶
எந்த மாற்றங்களும் இல்லை
எ இ அர் 0.7.5¶
முன்னுரை¶
This release is a bugfix release that fixes compatibility in the precompiled binary wheel packages with numpy versions < 1.20.0. முந்தைய வெளியீடு 0.7.4 ஒரு வழியில் பிணைப்பு கட்டப்பட்டது என்று ஒரு வழி 1.20.0 என்று தேவைப்படும் இது இப்போது நீக்கப்பட்டுள்ளது, அதனால் precompiled binary wheel தொகுப்புகள் எந்த எண் பொருத்தமான பதிப்புடன் பணிபுரிந்து கொள்ளும்.
Ignis 0.5.2¶
எந்த மாற்றங்களும் இல்லை
Aqua 0. 8. 2¶
எந்த மாற்றங்களும் இல்லை
IBM Q வழங்குபவர் 0.11.1¶
எந்த மாற்றங்களும் இல்லை
கிஸ்கிட் 0.23.5¶
Terra 0.16.4¶
முன்னுரை¶
இந்த வெளியீடு ஒரு பிழைத்திருத்த வெளியீடாகும், இது முதன்மையாக நம்பி 1.20.0 உடன் பொருந்தக்கூடிய தன்மையை சரிசெய்கிறது. இந்த எண்ணற்ற வெளியீடு பைத்தானின் எண் வகைகளுக்கான (`` np.int`` -> `` int``, `` np.float`` -> `` மிதவை`, முதலியன) மற்றும் அவற்றின் பயன்பாடு ஆகியவற்றிற்கான உள்ளூர் மாற்றுப்பெயர்களை நீக்கியது. கிஸ்கிட்டில் உள்ள மாற்றுப்பெயர்கள் ஏராளமான தேய்மான எச்சரிக்கைகள் வெளியேற்றப்பட்டன. இந்த வெளியீடு இதை சரிசெய்கிறது, எனவே அந்த நீக்குதல் எச்சரிக்கைகள் இல்லாமல் நீங்கள் கிஸ்கிட்டை எண்ணற்ற 1.20.0 உடன் இயக்க முடியும்.
எ இ அர் 0.7.4¶
பிழை திருத்தங்கள்¶
எண்ணற்ற 1.20.0 உடன் பொருந்தக்கூடிய தன்மையை சரிசெய்கிறது. இந்த எண்ணற்ற வெளியீடு பைத்தானின் எண் வகைகளுக்கான (`` np.int`` -> `` int``, `` np.float`` -> `` மிதவை`, முதலியன) மற்றும் அவற்றின் பயன்பாடு ஆகியவற்றிற்கான உள்ளூர் மாற்றுப்பெயர்களை நீக்கியது. கிஸ்கிட் ஏரில் உள்ள மாற்றுப்பெயர்கள் ஏராளமான தேய்மான எச்சரிக்கைகள் வெளியேற்றப்பட்டன. இந்த வெளியீடு இதை சரிசெய்கிறது, எனவே நீங்கள் கிஸ்கிட் ஏரை 1.20.0 உடன் எண்ணற்ற 1.20.0 உடன் இயக்க முடியும்.
Ignis 0.5.2¶
முன்னுரை¶
This release is a bugfix release that ప్రధానంగా fixes compatibility with numpy 1.20.0. இது பைதான் 3.9 க்கு ஆதரவு உள்ளிடும் முதல் வெளியீடாகும். முந்தைய வெளியீடுகள் (0.5.0 மற்றும் 0.5.1 உட்பட) பைதான் 3.9 உடன் பணியாற்றினார் ஆனால் இந்த பொதி மெட்டாடா இதில் இது குறிக்கவில்லை, மற்றும் அந்த வெளியீடுகளுக்கான மேம்பட்ட சோதனைகள் இல்லை. இந்த விடுதலை நீக்குகிறது மற்றும் பைதான் 3.9 (3.6, 3.7, மற்றும் 3.8) இல் சோதிக்கப்பட்டது.
பிழை திருத்தங்கள்¶
` networkx <https://networkx.org/>` __ (_) தற்போது சார்பாக பட்டியலிடப்பட்டுள்ளது. இது முன்பு :mod:` qiskit.ignis.verification.topological_codes ` module but was not නිවැරදිව listed as a depdendency as a depdendency as qiskit-terra also requires networkx and is a depdency of ignis so it would always be installed in practice. எனினும் இது தேவையாகத் தேவையாகத் தேவையாகத் தேவையாகத் தேவையான குசிக்ஸ்-டெரா (qiskit-terra) வெளியீடுகளுக்கான தேவையாகத் தேவைப்படுகிறது. பதிப்பு தேவைகளுக்கு இடையிலான ஒரு எதிர்காணி எதிர்மையை சரியாக பட்டியலிடும் வகையில் இது சரியாக உள்ளது.
Aqua 0. 8. 2¶
IBM Q வழங்குபவர் 0.11.1¶
எந்த மாற்றங்களும் இல்லை
கிஸ்கிட் 0.23.4¶
டெரா 0.16.3¶
பிழை திருத்தங்கள்¶
0.16.2 இல் அறிமுகப்படுத்தப்பட்ட ஒரு சிக்கல் சரி செய்யப்பட்டது, இது இயங்கும் போது பிழைகளை ஏற்படுத்தும்: func: q qiskit.compiler.transpile ஒரு சுற்றுக்கு 1 குவிட் வாயில்கள் மற்றும் ஒரு குவிட் மீது மட்டுமே செயல்படும் கேட் அல்லாத அறிவுறுத்தல்
எ இ அர் 0.7.3¶
எந்த மாற்றங்களும் இல்லை
லிக்னிஸ் 0.5.1¶
எந்த மாற்றங்களும் இல்லை
அக்வா 0.8.1¶
எந்த மாற்றங்களும் இல்லை
IBM Q வழங்குபவர் 0.11.1¶
எந்த மாற்றங்களும் இல்லை
Qiskit 0.23.3¶
டெரா 0.16.2¶
புதிய அம்சங்கள்¶
இந்த வெளியீட்டில் பைதான் 3.9 ஆதரவு சேர்க்கப்பட்டுள்ளது. நீங்கள் தற்பொழுது Qiskit Ibmq வழங்குபவர் பைதான் 3.9 பயன்படுத்தி இயக்கலாம்.
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
வகுப்பு: வர்க்கம்: ~ qiskit.library.standard_gates.x.MCXGrayCode இப்போது` num_ctrl_qubits 3 3 ஆகவும்,` num_ctrl_qubits 4 என்றால் 4` `` C3XGate`` ஐ உருவாக்கும். இது முந்தைய செயல்பாட்டுக்கு கூடுதலாக: வர்க்கத்தின் எந்த முறைகளுக்கும்: 'qiskit.library.standard_gates.x.MCXGate`, `` num_ctrl_bits`` 1 எனில், `` CXGate`` உருவாக்கப்பட்டது, 2 எனில், `` சி.சி.எக்ஸ் கேட்`` உருவாக்கப்பட்டது.
பிழை திருத்தங்கள்¶
துடிப்பு: py: class: ~ qiskit.pulse.instructions.Delay இன் அறிவுறுத்தல்கள் இப்போது இவ்வாறு வெளிப்படையாக கூடியிருக்கின்றன: class:` ~ qiskit.qobj.PulseQobjInstruction` பொருள்கள்: வகுப்பில் சேர்க்கப்பட்டுள்ளன: q qiskit.qobj.PulseQobj வெளியீடு : func: `~ qiskit.compiler.assemble.
முன்னதாக, நாம் புறக்கணிக்கலாம்: py: class: ~ qiskit.pulse.instructions.Delay இன் அறிவுறுத்தல்கள் a: class:` ~ qiskit.pulse.Schedule` இன் ஒரு பகுதியாக: func: ~ qiskit.compiler.assemble :class: ~ qiskit.qobj.PulseQobj பொருள்களில் நேரம் வெளிப்படையாக இருந்தது. ஆனால், இப்போது pulse gates, ஒரு தாமதத்தை மட்டுமே நாங்கள் திட்டமிடக்கூடிய சூழ்நிலைகள் உள்ளன, மேலும் தாமதத்தை உள்ளடக்குவது தாமதத்தை அகற்றும்.
தனிப்பயன் கேட் அளவுத்திருத்தங்களுடன் கூடிய சுற்றுகள் இப்போது ஒவ்வொரு சுற்று அளவுத்திருத்தத்தின் காலங்களையும் வெளிப்படையாக வழங்காமல் டிரான்ஸ்பைலருடன் திட்டமிடலாம்.
The
BasisTranslatorandUnrollerpasses, in some cases, had not been preserving the global phase of the circuit under transpilation. This has been fixed.ஒரு பிழை:func: qiskit.pulse.builder.frequency_offset, அங்கு` compensate_phase` ஒரு காரணியாக அமைக்கப்பட்டபோது:math:` 2 pi` சேர்க்கப்பட்ட கட்டத்தில் இருந்து காணவில்லை.
:class:` ~ qiskit.circuit.QuantumCircuit ` method :meth:` ~ qiskit.circuit.QuantumCircuit.Repit.QuantumCircuit.Repe`. If a circuit with global phase is appended to another circuit, the global phase is currently not propagated. சிமோலேட்டர்கள் இதை கவனிக்கின்றனர், இல்லையென்றால், இல்லையென்றால் பல முறை பயன்படுத்தப்படுகிறது. இது :meth:` ~ qiskit.circuit.QuantumCircuit.QuantumCircuit.QuantumCircuit.QuantumCircuit.ref க்கு முன்னால், மறுபடியும் மறுபடியும் மறுபடியும் மறுபடியும் மறுபடியும் கூடுதலாக.
பிழையை சரிசெய்கிறது: வர்க்கம்: ~ qiskit.quantum_info.SparsePauliOp, அங்கு ஒரு குறிப்பிட்ட பைதான் அல்லாத பில்டினால் பெருக்கினால் நம்பி ஸ்கேலர் வகைகள் தவறான மதிப்புகளை அளித்தன. திருத்தங்கள் # 5408 <https://github.com/Qiskit/qiskit-terra/issues/5408> __
ஹெலிங்கர் நம்பகத்தன்மையின் வரையறை முந்தைய கணிப்பிலிருந்து சரி செய்யப்பட்டது: கணிதம்: 1-எச் (பி, கியூ) முதல்: கணிதம்: [1-எச் (பி, கியூ) ^ 2] ^ 2 இது மூலைவிட்ட அடர்த்தி மெட்ரிக்குகளாக P, Q இன் குவாண்டம் நிலை நம்பகத்தன்மைக்கு சமம்.
CX வாயில்களின் எண்ணிக்கை 3-கட்டுப்படுத்தப்பட்ட X வாயில், :class:` ~ qiskit.circuit.library.C3XGate `. Compiled and optimized in the ` U CX ` அடிப்படையில், இப்போது மட்டுமே 14 CX மற்றும் 16 U வாயுக்கள் மட்டுமே 20 மற்றும் 22 இன் பதிலாக பயன்படுத்தப்படுகின்றன.
ஜூப்டர் பின்னணி விட்ஜெட் அல்லது :meth:` qiskit.tools.backend_monitor ` ஐ பயன்படுத்தும் இசையை பரிசோதிக்கிறது. பின்னணி அடிப்படையிலான வாயுக்கள் பாரம்பரிய u1, u2, மற்றும் u3 ஆகியவை இல்லை.
இயங்கும் போது: func: qiskit.compiler.transpile என்பது ஒற்றை உறுப்புடன் கூடிய சுற்றுகளின் பட்டியலில், ஒரு பட்டியலுக்குப் பதிலாக ஒரு சுற்றுக்குத் திரும்பப் பயன்படுத்தப்படும் செயல்பாடு. இப்போது, எப்போது: func: qiskit.compiler.transpile ஒரு பட்டியலுடன் அழைக்கப்படுகிறது, அந்த பட்டியலில் ஒரு உறுப்பு இருந்தாலும் அது ஒரு பட்டியலைத் தரும். # 5260 <https://github.com/Qiskit/qiskit-terra/issues/5260> __ ஐக் காண்க.
from qiskit import * qc = QuantumCircuit(2) qc.h(0) qc.cx(0, 1) qc.measure_all() transpiled = transpile([qc]) print(type(transpiled), len(transpiled))
<class 'list'> 1
எ இ அர் 0.7.3¶
புதிய அம்சங்கள்¶
இந்த வெளியீட்டில் பைதான் 3.9 ஆதரவு சேர்க்கப்பட்டுள்ளது. நீங்கள் தற்பொழுது Qiskit Aer மூலத்திலிருந்து கட்டமைக்காமல் பைதான் 3.9 பயன்படுத்தி இயக்கலாம்.
பிழை திருத்தங்கள்¶
அமைப்பில் சிக்கலை சரிசெய்கிறது: வர்க்கம்: ~ qiskit.providers.aer.QasmSimulator அடிப்படை வாயில்கள்` " முறை " மற்றும் " சத்தம்_மாடல் " விருப்பங்களை ஒன்றாகப் பயன்படுத்தும் போது, அவற்றைப் பயன்படுத்தி உருவாக்கப்பட்ட சிமுலேட்டருடன் பயன்படுத்தும் போது: மெத் : `~ qiskit.providers.aer.QasmSimulator.from_backend. இப்போது பட்டியலிடப்பட்ட அடிப்படை வாயில்கள் பின்தளத்தில் உள்ளமைவு, உருவகப்படுத்துதல் முறை மற்றும் இரைச்சல் மாதிரி அடிப்படை வாயில்கள் ஆதரிக்கும் வாயில்களின் குறுக்குவெட்டாக இருக்கும். இரைச்சல் மாதிரி அடிப்படை வாயில்கள் மற்றும் சிமுலேட்டர் அடிப்படை வாயில்கள் வெட்டுவது காலியாக இருந்தால் எச்சரிக்கை பதிவு செய்யப்படும்.
அமைப்பில் சிக்கலை சரிசெய்கிறது: வர்க்கம்: ~ qiskit.providers.aer.QasmSimulator அடிப்படை வாயில்கள்` " முறை " மற்றும் " சத்தம்_மாடல் " விருப்பங்களை ஒன்றாகப் பயன்படுத்தும் போது, அவற்றைப் பயன்படுத்தி உருவாக்கப்பட்ட சிமுலேட்டருடன் பயன்படுத்தும் போது: மெத் : `~ qiskit.providers.aer.QasmSimulator.from_backend. இப்போது பட்டியலிடப்பட்ட அடிப்படை வாயில்கள் பின்தளத்தில் உள்ளமைவு, உருவகப்படுத்துதல் முறை மற்றும் இரைச்சல் மாதிரி அடிப்படை வாயில்கள் ஆதரிக்கும் வாயில்களின் குறுக்குவெட்டாக இருக்கும். இரைச்சல் மாதிரி அடிப்படை வாயில்கள் மற்றும் சிமுலேட்டர் அடிப்படை வாயில்கள் வெட்டுவது காலியாக இருந்தால் எச்சரிக்கை பதிவு செய்யப்படும்.
பிழைகளை சரிசெய்கிறது: மெத்: ~ qiskit.providers.aer.noise.NoiseModel.from_backend மற்றும்: meth:` ~ qiskit.providers.aer.QasmSimulator.from_backend` where: attr: ~ qiskit.providers.aer. அடிப்படை வாயில் தொகுப்பு ` ['ஐடி', 'ஆர்.எஸ்', 'எஸ்.எக்ஸ்', 'எக்ஸ்', 'சிஎக்ஸ்'] `` ஐபிஎம்யூ சாதனங்களுக்கு NoiseModel.basis_gates` தவறாக அமைக்கப்பட்டது. இப்போது சத்தம் மாதிரியில் எப்போதும் பின்தளத்தில் அடிப்படை வாயில்கள் போன்ற அடிப்படை வாயில்கள் இருக்கும், அந்த அறிவுறுத்தல்கள் சத்தம் மாதிரியில் பிழைகள் உள்ளதா இல்லையா என்பதைப் பொருட்படுத்தாமல்.
QasmSimulator யின் மாட்ரிக்ஸ் உற்பத்தி மாநில முறையில் தட்டை பயன்படுத்தும்போது ஒரு பிழை நீக்கு.
லிக்னிஸ் 0.5.1¶
எந்த மாற்றங்களும் இல்லை
அக்வா 0.8.1¶
எந்த மாற்றங்களும் இல்லை
IBM Q வழங்குபவர் 0.11.1¶
எந்த மாற்றங்களும் இல்லை
கிஸ்கிட் 0.23.3¶
டெரா 0.16.1¶
எந்த மாற்றங்களும் இல்லை
எ இ அர் 0.7.3¶
புதிய அம்சங்கள்¶
CMake கொடியை ` ` DISABLE_CONAN ` ` (default= ` ` OFF ` `) சேர். மூலத்திலிருந்து நிறுவி, ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `. இது ஒரு சூழல் மாறாக ` DISABLE_CONAN ` `, இது CMake கொடியை மேல் எடுத்துக் கொள்ளும். இது AER கட்டுவதற்கு அதிகாரப்பூர்வை அளிக்கவில்லை. இப்படி, பயனர் அனைத்து தேவையான நூலகங்களையும், ஒத்திசைவு கோப்புகளையும் வழங்குவதற்கு பொறுப்பேற்றது.
பிழை திருத்தங்கள்¶
ஒரு பிழை நீக்கப்பட்ட OpenMP கொள்கையை அமைக்கும் போது உண்மையில் அமைக்கப்பட்டிருக்கும்.
லிக்னிஸ் 0.5.1¶
எந்த மாற்றங்களும் இல்லை
அக்வா 0.8.1¶
எந்த மாற்றங்களும் இல்லை
IBM Q வழங்குபவர் 0.11.1¶
எந்த மாற்றங்களும் இல்லை
கிஸ்கிட் 0.23.1¶
டெரா 0.16.1¶
பிழை திருத்தங்கள்¶
தாமதங்களுடன் கட்டப்பட்ட செல்லுபடியாகும் சுற்றுகளுக்கு இயக்கத்தில் பிழை எறியப்பட்ட ஒரு சிக்கல் சரி செய்யப்பட்டது.
Qelib1.inc யில் 'c4x' இன் QASM வரையறையை C4XGate க்கு நிலையான நூலகம் வரையறையை பொருந்துவதற்கு திருத்தப்பட்டது.
குவாண்டம் சேனல்களுக்கு கழிப்பதில் ஒரு பிழையை சரி செய்கிறது: கணிதம்: A - B எங்கே: கணிதம்:` B` என்பது ஒரு: வகுப்பு: ~ qiskit.quantum_info.Operator பொருள். ஆபரேட்டர் பிரதிநிதித்துவத்தில் உள்ள மேட்ரிக்ஸுக்கு நிராகரிப்பு பயன்படுத்தப்பட்டது, இது குவாண்டம் சேனல் பிரதிநிதித்துவத்தில் நிராகரிக்கப்படுவதற்கு சமமானதல்ல.
வழியை மாற்றுகிறது: மெத்: ~ qiskit.quantum_info.states.statevector.Statevector._evolve_instruction பல பதிவேடுகளுடன் ஒரு அறிவுறுத்தலின் வழக்கைக் கையாள அணுகல் வினாடிகள்.
எ இ அர் 0.7.1¶
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
Qiskit-aer உருவாக்க குறைந்தபட்ச சிக்கல் பதிப்பு 3.6 முதல் 3.8 ஆக உயர்ந்தது. GPU பதிப்பு x86_64 CPUல் இயங்கும் ஆதரவு AVX2 கட்டளைகளில் இயங்கும் ஆதரவைப் பயன்படுத்தி இந்த மாற்றம் தேவைப்பட்டது.
பிழை திருத்தங்கள்¶
ஜி.பீ.யூ ஆதரவுடன் qiskit-aer இப்போது AVX2 அறிவுறுத்தல்கள் இல்லாத x86_64 CPU களுடன் கணினிகளில் வேலை செய்யும். முன்னதாக, ஏ.வி.எக்ஸ் 2 அறிவுறுத்தல்கள் இருந்தால் மட்டுமே ஜி.பீ.யூ தொகுப்பு இயங்கும். திருத்தங்கள் `# 1023
பிழையை சரிசெய்கிறது: வர்க்கம்: ~ qiskit.providers.aer.AerProvider ஐப் பயன்படுத்தி திரும்பிய பின்தளத்தில் விருப்பங்கள் அமைக்கப்படுகின்றன: மெத்:` ~ qiskit.providers.aer.QasmSimulator.set_options` வழங்குநரில் சேமிக்கப்பட்டு அடுத்தடுத்த அழைப்புகளுக்கு தொடர்ந்து இருக்கும் to: meth: ~ qiskit.providers.aer.AerProvider.get_backend அதே பெயரிடப்பட்ட பின்தளத்தில். இப்போது ஒவ்வொரு அழைப்பும் மற்றும்: மெத்: ~ qiskit.providers.aer.AerProvider.backends கட்டமைக்கக்கூடிய சிமுலேட்டர் பின்தளத்தில் ஒரு புதிய நிகழ்வை வழங்குகிறது.
பிழை செய்தியில் பிழை தகவல் திரும்பி திரும்பும் போது ஒரு சுற்றுச்சொல் ஆதரிக்கப்படாத உரையாடல் கட்டளையை கொண்டிருக்கும். முன்னதாக சில ஆதரவுப் பரிந்துரைகள் பிழை செய்திகளில் பட்டியலிடப்பட்டன.
++ sx" `` கேட்: வகுப்பு: ~ qiskit.circuit.library.SXGate ஆனது C ++ குறியீட்டில் ஆதரிக்கப்படும் வாயிலாக பட்டியலிடப்படாத பிழையை சரிசெய்யவும்,` matrix_product_state.hp இன் StateOpSet இல்.
`` "சி.எஸ்.எக்ஸ்" ``, `` "கியூ 2" ``, `` "கியூ 3" `` ஆகியவை `` "அடர்த்தி_மாட்ரிக்ஸ்" `` முறை: வகுப்பின்: ~ முறைக்கு ஆதரிக்கப்பட்ட அடிப்படை வாயில்களாக தவறாக பட்டியலிடப்பட்ட பிழையை சரிசெய்யவும். qiskit.providers.aer.QasmSimulator.
MPS இல், apply_kraus ஆனது உள் குவிட்டுகளுக்குப் பதிலாக, அளவுரு குவிட்டுகளில் உள்ளீட்டு பிட்களில் நேரடியாக இயங்குகிறது. எம். பி. எஸ் வழிமுறையில், குவிட்கள் தொடர்ந்து சுற்றி வருகின்றன, எனவே அனைத்து செயல்பாடுகளும் உள் குவிட்டுகளுக்கு பயன்படுத்தப்பட வேண்டும்.
MPS:: sample_measure ஐத் தொடங்கும்போது, நாம் முதலில் qitsm_controller இல் உள்ள அனுமானமாக இருப்பதால், முன்னிருப்புகளை வரிசைப்படுத்த வேண்டும். இது move_all_qubits_to_sorted_ordering முறையைத் தொடங்குவதன் மூலம் செய்யப்படுகிறது. இது மாதிரி_அளவு_பயன்படுத்தல்_அறிவிப்பு_ அளவீட்டில் சரியானது, ஆனால் மாதிரி_அளவு_பயன்படுத்தல்_செயல்பாடுகளில் காணவில்லை.
லிக்னிஸ் 0.5.1¶
பிழை திருத்தங்கள்¶
வர்க்கத்தின் `` "ஆட்டோ" `` முறையை சரிசெய்யவும்: ~ qiskit.ignis.verification.tomography.TomographyFitter ,: class:` ~ qiskit.ignis.verification.tomography.StateTomographyFitter`, மற்றும்: class: ~ qiskit.ignis.verification.tomography.ProcessTomographyFitter ஐ CVXPY நிறுவப்பட்டிருந்தால் `` "cvx" `` ஐ மட்டுமே பயன்படுத்த * மற்றும் * SCS ஐத் தவிர மூன்றாம் தரப்பு SDP தீர்வி கிடைக்கிறது. ஏனென்றால், எஸ்சிஎஸ் தீர்வி மற்ற தீர்வி முறைகளை விட குறைந்த துல்லியத்தன்மையைக் கொண்டுள்ளது மற்றும் பெரும்பாலும் அடர்த்தி மேட்ரிக்ஸ் அல்லது சோய்-மேட்ரிக்ஸை முழுமையாக நேர்மறையானது அல்ல, மேலும்: func: qiskit.quantum_info.state_fidelity அல்லது: func: உடன் பயன்படுத்தும்போது சரிபார்ப்பில் தோல்வியடைகிறது.
அக்வா 0.8.1¶
0. 8. 1¶
புதிய அம்சங்கள்¶
ஒரு புதிய வழிமுறை சேர்க்கப்பட்டுள்ளது: மூலக்கூறின் சுதந்திரத்தின் வெவ்வேறு அளவுகளில் சாத்தியமான ஆற்றல் மேற்பரப்பைக் கணக்கிடுவதற்கான பிறப்பு ஓப்பன்ஹைமர் ஆற்றல் ஆற்றல் மேற்பரப்பு. வழிமுறை `` BOPESSampler`` என அழைக்கப்படுகிறது. இது முன் வரையறுக்கப்பட்ட ஆற்றல்களின் பகுப்பாய்வு செயல்பாட்டிற்கு சாத்தியமான ஆற்றல் மேற்பரப்பை பொருத்துவதற்கான செயல்பாடுகளை மேலும் வழங்குகிறது. சில விவரங்கள்.
விமர்சனங்கள்¶
பிழை சரிசெய்தலின் விளைவாக `` QAOA`` இல் உள்ள `` ஆரம்ப_நிலையம்`` அளவுரு இப்போது வேறுபட்ட செயலாக்கத்தைக் கொண்டுள்ளது என்பதை அறிந்து கொள்ளுங்கள். முந்தைய செயலாக்கம் பயனர் `` ஆரம்ப_நிலையம்`` ஐ ஹடமார்ட் வாயில்களுடன் தவறாக கலக்கியது. சிக்கல் இப்போது சரி செய்யப்பட்டது. வழங்கப்பட்ட `` ஆரம்ப_நிலையம்`` அளவுருவை உங்கள் குறியீடு பயன்படுத்தாவிட்டால் கவனம் தேவையில்லை.
பிழை திருத்தங்கள்¶
qp_solver இன் optimize_svm முறை சில நேரங்களில் இதுபோன்ற பிழையின் விளைவாக தோல்வியடையும் மதிப்பு பிழை: அளவு 1 இன் வடிவத்தை வடிவமாக மாற்றியமைக்க முடியாது (200,1) இது எல் 2 நெறிமுறை அளவுருவான லாம்ப்டா 2 ஐ சேர்ப்பதன் மூலம் சிக்கலை தீர்க்கிறது, இது இயல்புநிலையாக 0.001 ஆக இருக்கும், ஆனால் இருக்க முடியும் QSVM வழிமுறை வழியாக மாற்றப்பட்டது, தேவைக்கேற்ப, ஒன்றிணைவதை எளிதாக்குகிறது.
DOCplex இன் சமீபத்திய கட்டமைப்பில் `` One_letter_symbol`` என்ற முறை `` VarType`` இலிருந்து அகற்றப்பட்டது, இது அக்வாவை இந்த பதிப்போடு பொருந்தாது. எனவே இந்த முறையைப் பயன்படுத்துவதற்குப் பதிலாக, அக்வா தேர்வுமுறை தொகுதியில் மாறி வகைகளின் வெளிப்படையான வகை சோதனை அறிமுகப்படுத்தப்பட்டுள்ளது.
:மெத் `~ க்கிஸ்கிட்.அக்வா.ஓபெராடோர்ஸ்.ஸ்டேட் _ fns.DictStateFn.sample () `. உண்மை யானா அம்பிலிட்டுட்ட் -ஐ மட்டுமே கையாள முடியும், ஆனால் சிக்கலான அம்பிலிட்டுட்ட் -ஐ கையாள இது செய்யப்பட்டது. மேலும் விவரங்களுக்காக <https://github.com/Qiskit/qiskit-aqua/issues/1311>`#1311.
ட்ராட்டர் வகுப்பு கட்டுப்பாட்டில் மறுபடியும் பயன்படுத்தவில்லை. மேலும் விவரங்களுக்காக <https://github.com/Qiskit/qiskit-aqua/issues/1317>`#1317.
ஒரு எழுப்பு AquaError if :class 'Kit qiskit.aqua.operators.converters.CircuitSampler ` வெற்று ஆபரேட்டரின் மாதிரிகள். மேலும் விவரங்களுக்காக <https://github.com/Qiskit/qiskit-aqua/issues/1321>`#1321.
: meth: ~ qiskit.aqua.operators.legacy.WeightedPauliOperator.to_opflow () குணகங்கள் சிக்கலான எண்களாக இருக்கும்போது சரியான ஆபரேட்டரைத் தருகிறது. மேலும் விவரங்களுக்கு # 1381 <https://github.com/Qiskit/qiskit-aqua/issues/1381>.
குவாண்டம் இன்ஸ்டான்ஸில் மட்டுமே aerக்கு கட்டுப்படுத்துவதற்குப் பதிலாக பின்தளத்தில் சிமுலேட்டர்கள் நொய்ஸ்மாடல் ஆதரவை சரிபார்க்கட்டும்.
குவாண்டம் இன்ஸ்டான்ஸ்
transpileமுறையில் பாஸ்மேனேஜரை சரியாகக் கையாள, அதன்runமுறை இருந்தால் அதை அழைக்கவும்.மிஃஸ்ஸ் கஸ்டம் பிழை` ` initial_state ` ` இன் 'QAOA' ஹடமார்ட் வாயில்கள் சரி செய்யப்பட்டுள்ளன. பயன்படுத்துபவர்கள் இனிஷியல்_ ஸ்டேட் எதுவும் வழங்கப்படாவிட்டால் இது QAOA இன் செயல்பாட்டை மாற்றாது. தேர்வுமுறை முடிவுகள் வேறுபடக்கூடும் என்பதால் உங்கள் செயல்பபாடும், QAOA ஐயூம்
initial_stateஅளவுருவுடன் இருக்குமாறு கவனம் செலுத்தப்பட வேண்டும்.முன் 'seed_simulator=0' 'QuantumInstance' எந்த சீயிட்டும் அமைக்கவில்லை. இது மதிப்பு 0 ஐ மட்டுமே பாதிக்கிறது. இது சரி செய்யப்பட்டது.
IBM Q வழங்குபவர் 0.11.1¶
புதிய அம்சங்கள்¶
: class: qiskit.providers.ibmq.experiment.Experiment இல் இப்போது மூன்று கூடுதல் பண்புக்கூறுகள் உள்ளன,` ஹப்`, குழு, மற்றும்` திட்டம்`, அவை பரிசோதனையை உருவாக்க பயன்படும் வழங்குநரை அடையாளம் காணும்.
முறைகள்: மெத்: qiskit.providers.ibmq.experiment.ExperimentService.experiment மற்றும்: மெத்:` qiskit.providers.ibmq.experiment.ExperimentService.analysis_results` இப்போது எண்ணைக் கட்டுப்படுத்த உங்களை அனுமதிக்கும் `` வரம்பு`` அளவுருவை ஆதரிக்கிறது சோதனைகள் மற்றும் பகுப்பாய்வு முடிவுகள் திரும்பின.
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
முறைகள்: மெத்: qiskit.providers.ibmq.experiment.ExperimentService.experiment மற்றும்: மெத்:` qiskit.providers.ibmq.experiment.ExperimentService.analysis_results` இப்போது எண்ணைக் கட்டுப்படுத்த உங்களை அனுமதிக்கும் `` வரம்பு`` அளவுருவை ஆதரிக்கிறது சோதனைகள் மற்றும் பகுப்பாய்வு முடிவுகள் திரும்பின.
பிழை திருத்தங்கள்¶
வேலை சமர்ப்பிப்பு பாதி வழியில் தோல்வியுற்றால், `` உருவாக்குதல்`` நிலையில் ஒரு வேலையை விடக்கூடிய சிக்கலை சரிசெய்கிறது.
ஒரு குழந்தை செயல்முறைக்கு `` IBMQRandomService`` உதாரணத்தை அனுப்பும்போது எழுப்பப்படும் எல்லையற்ற சுழற்சியை சரிசெய்கிறது.
Qiskit 0. 23.0¶
டெரா 0.16.1¶
முன்னுரை¶
0.16.0 வெளியீட்டில் பல புதிய அம்சங்கள் மற்றும் பிழை திருத்தங்கள் ஆகியவை அடங்கும். இந்த வெளியீட்டில் வரும் அம்சங்கள் பின்வருமாறு:
திட்டமிடப்பட்ட சிர்குய்ட் அறிமுகம், சிர்குய்ட் செயல்பாடுகளின் நேரம் மற்றும் சீரமைப்பைக் கட்டுப்படுத்த காலதாமதம் பயன்படுத்தப்படலாம்.
குவாண்டம் சர்க்குய்ட் கோட்பாடு ஒவ்வொன்றும் பாரம்பரிய செயல்பாடுகளான ஆரக்கிள்போன்றவை.
வெவ்வேறு யூலர் அடிப்படையிலும் கட்டம் + சதுர-ரூட் (எக்ஸ்) அடிப்படையிலும் ஒற்றை குபிட் சுழற்சிகளை தொகுத்து மேம்படுத்தும் திறன்(அதாவது` ` பி ',' ஸ் எக்ஸ் ']) ` ` ['யு 1', 'யு2', 'யு3'] ` `.
Tracking of
global_phase()on theQuantumCircuitclass has been extended through thetranspiler,quantum_info, andassemblermodules, as well as the BasicAer and Aer simulators. Unitary and state vector simulations will now return global phase-correct unitary matrices and state vectors.
Also of particular importance for this release is that Python 3.5 is no longer supported. If you are using Qiskit Terra with Python 3.5, the 0.15.2 release is that last version which will work.
புதிய அம்சங்கள்¶
Global R gates have been added to
qiskit.circuit.library. This includes the global R gate (GR), global Rx (GRX) and global Ry (GRY) gates which are derived from theGRgate, and global Rz (GRZ) that is defined in a similar way to theGRgates. The global R gates are defined on a number of qubits simultaneously, and act as a direct sum of R gates on each qubit.உதாரணத்திற்கு:
from qiskit import QuantumCircuit, QuantumRegister import numpy as np num_qubits = 3 qr = QuantumRegister(num_qubits) qc = QuantumCircuit(qr) qc.compose(GR(num_qubits, theta=np.pi/3, phi=2*np.pi/3), inplace=True)
ஒரு :class: 'qiskit.circuit.QuantumCircuit` ஐ உருவாக்கும் :class:` q qiskit.circuit.QuantumRegister` 3 qubits மற்றும் ஒரு :class: ~ qiskit.circuit.library.RGate ஒரு கோணத்தில்:math: theta = frac{pi}{3} Bloch spheres-ன் xy- planeல் ஒரு கோணத்தை உருவாக்குகிறது \(\phi = \frac{2\pi}{3}\) `ஒவ்வொரு qubitலும் x-axis உடன்.
சர்க்யூட் டிராயருக்கான `` mpl`` பின்தளத்தில் `` iqx`` என்ற புதிய வண்ணத் திட்டம் சேர்க்கப்பட்டுள்ளது :func: qiskit.visualization.circuit_drawer மற்றும் :meth:` qiskit.circuit.QuantumCircuit.draw`. இது ஐபிஎம் குவாண்டம் எக்ஸ்பீரியன்ஸ் இணையதளத்தில் சர்க்யூட் அ மைப்பாளரின் அதே வண்ணத் திட்டத்தைப் பயன்படுத்துகிறது. இப்போது 3 வண்ணத் திட்டங்கள் உள்ளன - `` இயல்புநிலை``, `` iqx``, மற்றும் `` bw``.
There are two ways to select a color scheme. The first is to use a user config file, by default in the
~/.qiskitdirectory, in the filesettings.confunder the[Default]heading, a user can entercircuit_mpl_style = iqxto select theiqxcolor scheme.The second way is to add
{'name': 'iqx'}to thestylekwarg to theQuantumCircuit.drawmethod or to thecircuit_drawerfunction. The second way will override the setting in the settings.conf file. For example:from qiskit.circuit import QuantumCircuit circuit = QuantumCircuit(2) circuit.h(0) circuit.cx(0, 1) circuit.measure_all() circuit.draw('mpl', style={'name': 'iqx'})
சர்க்யூட் டிராயருக்கான `` ஸ்டைல்`` குவார்க்கில் :func: qiskit.visualization.circuit_drawer மற்றும் :meth:` qiskit.circuit.QuantumCircuit.dra`` `` டிஸ்ப்ளாக்கலர்`` புலத்தை `` எம்.பி.எல்`` பின்தளத்தில் இப்போது கேட் வண்ணம் மற்றும் ஒவ்வொரு கேட் வகைக்கும் உரை வண்ணம் இரண்டையும் `` (கேட்_ கலர், உரை_ வண்ணம்) `` வடிவத்தில் உள்ளிட அனுமதிக்கிறது. மாறுபட்ட உரை வண்ணங்களுடன் ஒளி மற்றும் இருண்ட வாயில் வண்ணங்களைப் பயன்படுத்த இது அனுமதிக்கிறது. பயனர்கள் இன்னும் கேட் நிறத்தை மட்டுமே அமைக்க முடியும், இந்நிலையில் `` கேடெக்ஸ்ட் கலர்`` புலம் பயன்படுத்தப்படும். கேட் வண்ணங்களை எந்தவொரு கேட் வகைகளுக்கும் `` ஸ்டைல்`` டிக்டில் அமைக்கலாம், ஒன்று முதல் முழு டிஸ்ப்ளே கலர்` டிக்ட் வரை. உதாரணத்திற்கு:
from qiskit.circuit import QuantumCircuit circuit = QuantumCircuit(1) circuit.h(0) style_dict = {'displaycolor': {'h': ('#FA74A6', '#000000')}} circuit.draw('mpl', style=style_dict)
அல்லது
style_dict = {'displaycolor': {'h': '#FA74A6'}} circuit.draw('mpl', style=style_dict)
தாமதங்களுடன் மீண்டும் மீண்டும் துடிப்பு வரிசையை எழுதுவதற்கு வசதியாக துடிப்பு கட்டடத்தில் (: mod: qiskit.pulse.builder) இரண்டு சீரமைப்பு சூழல்கள் சேர்க்கப்படுகின்றன.
func: qiskit.pulse.builder.align_equispaced சூழலில் துடிப்பு அட்டவணைகளுக்கு இடையில் சம நீளத்துடன் தாமதங்களை செருகும்.
: func: qiskit.pulse.builder.align_func துடிப்பு நிலையின் மேம்பட்ட கட்டுப்பாட்டை வழங்குகிறது. இந்த சூழல் ஐ-வது துடிப்பின் ஒரு பகுதியளவு ஒருங்கிணைப்பைக் கணக்கிட்டு, சூழலுக்குள் பருப்புகளை சீரமைக்கக்கூடிய ஒரு அழைப்பை எடுக்கிறது. இது டைனமிகல் டிகூப்பிளிங்கின் குறியீட்டை எளிதாக்குகிறது.
ரன் உள்ளமைவின் கீழ்: வகுப்பு: ~ qiskit.qobj.QasmQobj வகுப்பில்` rep_delay` அளவுரு சேர்க்கப்பட்டுள்ளது ,: வகுப்பு:` ~ qiskit.qobj.QasmQobjConfig`. நிரல் செயலாக்கங்களுக்கு இடையிலான நேரத்தைக் குறிக்க இந்த அளவுரு பயன்படுத்தப்படுகிறது. வகுப்பு: ~ qiskit.providers.models.BackendConfiguration முறை: மெத்:` ~ qiskit.providers.models.BackendConfiguration.rep_delay_range` வழங்கிய பின்தளத்தில் இருந்து இது தேர்ந்தெடுக்கப்பட வேண்டும். ஒரு மதிப்பு பின்தளத்தில் இயல்புநிலையாக வழங்கப்படாவிட்டால் ,: attr: qiskit.providers.models.BackendConfiguration.default_rep_delay, பயன்படுத்தப்படும். `` rep_delay`` என்பது பின்தளத்தில் மட்டுமே செயல்படும், இது மாறும் மறுபடியும் நேரத்தை அனுமதிக்கும். இதை: class: ~ qiskit.providers.models.BackendConfiguration property: attr:` ~ qiskit.providers.models.BackendConfiguration.dynamic_reprate_enabled` உடன் இதைச் சரிபார்க்கலாம்.
`` qobj_schema.json`` இன் JSON ஸ்கீமா கோப்பு: mod: qiskit.schemas QASM Qobj களுக்கான விருப்ப உள்ளமைவு சொத்தாக` rep_delay` ஐ சேர்க்க புதுப்பிக்கப்பட்டுள்ளது.
`` பின்தளத்தில்_அமைவு_ஸ்கீமா .ஜ்சன்`` இந்த ஜ்சன் திட்ட கோப்பு: mod: qiskit.schemas ஒரு QASM பின்தளத்தில் உள்ளமைவுக்கான விருப்ப பண்புகளாக` டைனமிக்_ரெபரேட்_எனபிள்`,` ரெப்_டேலே_ரேஞ்ச்` மற்றும்` இயல்புநிலை_ரெப்_டேலே` ஆகியவற்றைச் சேர்க்க புதுப்பிக்கப்பட்டுள்ளது. பேலோட்.
ஒரு புதிய ஒப்பீட்டை கடந்து, :class:` qiskit.transpiler.passes.TemplateOptimization . இந்த கடவுச்சொல் ` arXiv: 1909.05270 <https://arxiv.org/pdf/1909.05270.pdf> _ (_) சுற்றுப்பாதையில் அனைத்து பொருத்தமான அதிகபட்ச போட்டிகளையும், ` arXiv: 1909.05270 <https://arxiv.org/pdf/1909.05270.pdf> ` (_) இல் விவரிக்கும் ஒரு வார்ப்புருவை பயன்படுத்துகிறது.
இந்த புதிய மின்சாரத்தை செயற்படுத்துவதற்கு ஒரு புதிய கூறு, ` ` template_circuits ` , சேகரிப்பு நூலகத்துக்கு சேர்க்கப்பட்டது (:mod: qiskit.circuit.library ). This new module contains all the Toffoli circuit templates used in the :class: ~ qiskit.transpiler.passes.TemplateOptimization `.
இந்த புதிய பாஸ் தற்போது முன்னமைக்கப்பட்ட பாஸ் மேலாளர்களில் சேர்க்கப்படவில்லை (:mod: qiskit.transpiler.preset_passmanagers), இதைப் பயன்படுத்த நீங்கள் ஒரு தனிப்பயனை உருவாக்க வேண்டும்:class:` ~ qiskit.transpiler.PassManager` .
வழங்குநர்கள் இடைமுகத்தின் புதிய பதிப்பு சேர்க்கப்பட்டது. இந்த புதிய இடைமுகம்: mod: qiskit.providers இல் காணப்படுகிறது, இது ஒரு புதிய பதிப்பு பொறிமுறையை வழங்குகிறது, இது இடைமுகத்தில் மாற்றங்களை காலப்போக்கில் இணக்கமான முறையில் நடக்க உதவும். புதிய இடைமுகம் ஏற்கனவே உள்ள வழங்குநர்களை நகர்த்துவதற்கு எளிமையாக இருக்க வேண்டும், ஏனெனில் இது வெளிப்படையான பதிப்பைத் தவிர பெரும்பாலும் ஒரே மாதிரியாக இருக்கும்.
வெளிப்படையாக பதிப்பு செய்யப்பட்ட சுருக்க வகுப்புகளைத் தவிர, புதிய இடைமுகத்திற்கான முக்கிய மாற்றங்கள்: வர்க்கம்: ~ qiskit.providers.BackendV1 முறை: மெத்:` ~ qiskit.providers.BackendV1.run` இப்போது ஒரு: வகுப்பு: ~ qiskit.circuits.QuantumCircuit அல்லது: class: ~ qiskit.pulse.Schedule பொருள்` Qobj` பொருட்களுக்கு பதிலாக உள்ளீடுகளாக. அந்த விருப்பங்களுடன் செல்ல இப்போது ஒரு பின்தளத்தில் வகுப்பின் ஒரு பகுதியாக உள்ளது, இதனால் பயனர்கள் ஒரு சுற்றுடன் இயங்கும் போது இயக்க நேர விருப்பங்களை உள்ளமைக்க முடியும். இறுதி மாற்றம் என்னவென்றால்: வர்க்கம்: qiskit.providers.JobV1 இப்போது ஒத்திசைவாக அல்லது ஒத்திசைவற்றதாக இருக்கலாம், இதை உள்ளமைப்பதற்கான சரியான உள்ளமைவு மற்றும் முறை வழங்குநரிடம் உள்ளது, ஆனால் எந்த மரணதண்டனை மாதிரியை வெளிப்படையாக வெளிப்படுத்த இடைமுக ஹூக் புள்ளிகள் உள்ளன `` ஜாப்வி 1`` சுருக்க வகுப்பில் வேலை இயங்குகிறது.
ஒரு புதிய குவார்க், `` இடம்``, செயல்பாட்டில் சேர்க்கப்பட்டுள்ளது: func: qiskit.result.marginal_counts. உள்ளடக்கங்கள் ஓரங்கட்டப்பட்டதா அல்லது புதிய நகல் திரும்பப் பெறப்படுகிறதா என்பதைக் கட்டுப்படுத்த இந்த குவார்க் பயன்படுத்தப்படுகிறது, இதற்கு: வகுப்பு: ~ qiskit.result.Result பொருள் உள்ளீடு. இந்த அளவுரு ஒரு உள்ளீட்டு `` டிக்ட்`` அல்லது: வகுப்பு: ~ qiskit.result.Counts பொருளுக்கு எந்த விளைவையும் ஏற்படுத்தாது.
கிளாசிக்கல் செயல்பாட்டு தொகுப்பின் ஆரம்ப பதிப்பு ,: mod: qiskit.circuit.classicalfunction, சேர்க்கப்பட்டுள்ளது. இது தட்டச்சு செய்யப்பட்ட பைதான் செயல்பாடுகளை தொகுக்க உதவுகிறது (இந்த நேரத்தில் `` Int1`` வகை பிட்களில் மட்டுமே இயங்குகிறது): வர்க்கம்: ~ qiskit.circuit.QuantumCircuit பொருள்கள். உதாரணத்திற்கு:
from qiskit.circuit import classical_function, Int1 @classical_function def grover_oracle(a: Int1, b: Int1, c: Int1, d: Int1) -> Int1: x = not a and b y = d and not c z = not x or y return z quantum_circuit = grover_oracle.synth() quantum_circuit.draw()
q_0: ──■────■────■────o──────────── │ │ │ │ q_1: ──o────o────┼────┼────■────■── │ │ │ │ │ │ q_2: ──o────■────o────┼────■────┼── │ │ │ │ │ │ q_3: ──o────┼────■────┼────■────o── ┌─┴─┐┌─┴─┐┌─┴─┐┌─┴─┐┌─┴─┐┌─┴─┐ q_4: ┤ X ├┤ X ├┤ X ├┤ X ├┤ X ├┤ X ├ └───┘└───┘└───┘└───┘└───┘└───┘The parameter
registerless=Falsein theqiskit.circuit.classicalfunction.ClassicalFunctionmethodsynth()creates a circuit with registers refering to the parameter names. For example:quantum_circuit = grover_oracle.synth(registerless=False) quantum_circuit.draw()
d_0: ──■────■────■────o──────────── │ │ │ │ c_0: ──o────o────┼────┼────■────■── │ │ │ │ │ │ b_0: ──o────■────o────┼────■────┼── │ │ │ │ │ │ a_0: ──o────┼────■────┼────■────o── ┌─┴─┐┌─┴─┐┌─┴─┐┌─┴─┐┌─┴─┐┌─┴─┐ return_0: ┤ X ├┤ X ├┤ X ├┤ X ├┤ X ├┤ X ├ └───┘└───┘└───┘└───┘└───┘└───┘ஒரு சாதாரண மரபு செயற்கைக்கோள் ஒரே வழி ஒரே வழியே பயன்படுத்தலாம் அதனை ஒரு சுற்றுப்பகுதியை ஏற்றும் போது.
circuit = QuantumCircuit(5) circuit.append(grover_oracle, range(5)) circuit.draw()
┌────────────────┐ q_0: ┤0 ├ │ │ q_1: ┤1 ├ │ │ q_2: ┤2 GROVER_ORACLE ├ │ │ q_3: ┤3 ├ │ │ q_4: ┤4 ├ └────────────────┘`` GROVER_ORACLE`` வாயில் அதன் சிதைவு தேவைப்படும்போது ஒருங்கிணைக்கப்படுகிறது.
circuit.decompose().draw()
q_0: ──■────■────■────o──────────── │ │ │ │ q_1: ──o────o────┼────┼────■────■── │ │ │ │ │ │ q_2: ──o────■────o────┼────■────┼── │ │ │ │ │ │ q_3: ──o────┼────■────┼────■────o── ┌─┴─┐┌─┴─┐┌─┴─┐┌─┴─┐┌─┴─┐┌─┴─┐ q_4: ┤ X ├┤ X ├┤ X ├┤ X ├┤ X ├┤ X ├ └───┘└───┘└───┘└───┘└───┘└───┘வளிமண்டலத்தில் ` ` pip install tweedledum ` ` ` ` pip நிறுவனத்தின் மூலம் நிறுவப்பட்டிருக்க முடியும் என்று ` ` tweedledum ` `, ஒரு நூலகம் தேவைப்படுகிறது.
ஒரு புதிய வகுப்பு: வகுப்பு: ஒரு சுற்றுவட்டத்தில் தாமத அறிவுறுத்தலைக் குறிக்கும் qiskit.circuit.Delay சேர்க்கப்பட்டுள்ளது. ஒரு புதிய முறை: மெத்: ~ qiskit.circuit.QuantumCircuit.delay இப்போது சுற்றுகளுக்கு தாமதங்களை எளிதில் சேர்க்க கிடைக்கிறது. இது சுற்று மட்டத்தில் நேர-உணர்திறன் சோதனைகளை (எ.கா. T1 / T2 சோதனை) விவரிக்க உதவுகிறது.
from qiskit import QuantumCircuit qc = QuantumCircuit(1, 1) qc.delay(500, 0, unit='ns') qc.measure(0, 0) qc.draw()
┌────────────────┐┌─┐ q_0: ┤ DELAY(500[ns]) ├┤M├ └────────────────┘└╥┘ c: 1/═══════════════════╩═ 0ஒரு புதிய வகுப்பு: வகுப்பு: ஒரு சுற்றுவட்டத்தில் தாமத அறிவுறுத்தலைக் குறிக்கும் qiskit.circuit.Delay சேர்க்கப்பட்டுள்ளது. ஒரு புதிய முறை: மெத்: ~ qiskit.circuit.QuantumCircuit.delay இப்போது சுற்றுகளுக்கு தாமதங்களை எளிதில் சேர்க்க கிடைக்கிறது. இது சுற்று மட்டத்தில் நேர-உணர்திறன் சோதனைகளை (எ.கா. T1 / T2 சோதனை) விவரிக்க உதவுகிறது.
from qiskit import QuantumCircuit, transpile from qiskit.test.mock.backends import FakeAthens qc = QuantumCircuit(2) qc.h(0) qc.cx(0, 1) scheduled_circuit = transpile(qc, backend=FakeAthens(), scheduling_method="alap") print("Duration in dt:", scheduled_circuit.duration) scheduled_circuit.draw(idle_wires=False)
Duration in dt: 2016
┌─────────┐ ┌────┐┌─────────┐ q_0 -> 0 ───┤ RZ(π/2) ├────┤ √X ├┤ RZ(π/2) ├──■── ┌──┴─────────┴───┐└────┘└─────────┘┌─┴─┐ q_1 -> 1 ┤ DELAY(160[dt]) ├─────────────────┤ X ├ └────────────────┘ └───┘: func: திட்டமிடப்பட்ட சுற்றுகளின் சிறந்த காட்சிப்படுத்தலுக்கு q qiskit.visualization.timeline_drawer.
ஒரு புதிய பிரிவு: func: qiskit.compiler.afterence மேலும் சேர்க்கப்பட்டுள்ளது, இதன்மூலம் ஒரு திட்டமிடப்பட்ட சுற்றுவட்டத்தை ஒரு: வகுப்பாக மாற்றலாம்:` ~ qiskit.pulse.Schedule` அதை துடிப்பு-இயக்கப்பட்ட பின்தளத்தில் இயக்கக்கூடியதாக மாற்றும்.
from qiskit.compiler import sequence sched = sequence(scheduled_circuit, pulse_enabled_backend)
: Func: ~ qiskit.compiler.schedule புதுப்பிக்கப்பட்டுள்ளது, இதனால் தாமதங்களுடன் சுற்றுகளை திட்டமிட முடியும். தாமதத்துடன் ஒரு சுற்று திட்டமிட இப்போது இரண்டு பாதைகள் உள்ளன:
qc = QuantumCircuit(1, 1) qc.h(0) qc.delay(500, 0, unit='ns') qc.h(0) qc.measure(0, 0) sched_path1 = schedule(qc.decompose(), backend) sched_path2 = sequence(transpile(qc, backend, scheduling_method='alap'), backend) assert pad(sched_path1) == sched_path2
இதனுக்கான வெளியீட்டுக் குறிப்புகள் மற்றும் ஆவணங்களைப் பார்க்கவும்: func: ~ qiskit.compiler.transpile மற்றும்: func:` ~ qiskit.compiler.afterence` மற்ற பாதையில் உள்ள விவரங்களுக்கு.
க்ரோவரின் தேடல் வழிமுறை மற்றும் குவாண்டம் அலைவீச்சு பெருக்கம் / மதிப்பீடு ஆகியவற்றில் பயன்படுத்தப்படும் க்ரோவர் ஆபரேட்டரை உருவாக்க: வகுப்பு: ~ qiskit.circuit.library.GroverOperator ஐ சுற்று நூலகத்தில் (: mod:` qiskit.circuit.library`) சேர்த்துள்ளார். ஒரு சுற்று வடிவத்தில் ஆரக்கிள் வழங்கப்படுகிறது, `` க்ரோவர் ஆபரேட்டர்`` க்ரோவர் ஆபரேட்டரை உருவாக்குகிறது. வீச்சு பெருக்கத்திற்காக இதைப் பொதுமைப்படுத்தவும், ஹடமார்ட் வாயில்களுக்குப் பதிலாக ஒரு பொதுவான ஆபரேட்டரை மாநில தயாரிப்பாகப் பயன்படுத்தவும், `` ஸ்டேட்_இன்`` வாதத்தைப் பயன்படுத்தலாம்.
:class:` ~ qiskit.pulse.InstructionScheduleMap ` முறைகள் :meth:` ~ qiskkit.pulse.InstructionScheduleMap.get ` and :meth:` ~ qiskit.pulse.InstructionScheduleMap.Pop ` முறைகள் இப்போது :class:` ~ qiskit.circuit.ParameterExpression ` instances in addition to numerical values for schedule generator parameters. பொதுவான செயல்பாடு செயல்பாடு என்றால், செயல்பாடு முன் அல்லது செயல்பாடு அழைக்கப்படுவதற்கு முன் வைத்திருக்கலாம். ஜெனரேட்டர் ஒரு :class:` ~ qiskit.pulse.ParametrizedSchedule ` என்றால், வரிசைப்படுத்துவதற்கு முன் பரிந்துரைக்கப்பட்டிருக்க வேண்டும்.
ஒரு புதிய வகுப்பு: வகுப்பு: ~ qiskit.circuit.library.LinearAmplitudeFunction சுற்று நூலகத்தில் (: mod:` qiskit.circuit.library`) மேப்பிங் (பிஸ்கேவ்) நேரியல் செயல்பாடுகளை குவிட் அலைவீச்சுகளில்,
\[F|x\rகோணம் | 0\rகோணம் = \sqrt {1-f (x)} |x\rகோணம் | 0\rகோணம் + \sqrt {f (x)} |x\rகோணம் | 1\rகோணம்\]வரைபடம் ஒரு கட்டுப்பாடற்ற Pauli Y-rotations and a Taylor approximation, as විස්තර in https://arxiv.org/abs/1806.06893. இந்த சுற்றுப்பொருளின் கணிப்பொறி கணிப்பொறி மதிப்பீடுகளின் கணிப்பொறி மதிப்புகளின் கணிப்பொறி மதிப்பை கணக்கிடும்.
The new jupyter magic ` ` monospaced_output ` ` :mod:` qiskit.tools.jupyter ` module. இந்த மந்திரம் ஜூபியர் கடிகார வெளியீட்டு எழுத்துருவை "கூரியர் நியூ", சாத்தியமாக அமைக்கிறது. இந்த மின்னெழுத்துக்களைப் பயன்படுத்தும் போது உரை சுற்றுப்பாதை வரையறுக்கிறது.
import qiskit.tools.jupyter %monospaced_output
ஒரு புதிய டிரான்ஸ்பைலர் பாஸ் ,: வகுப்பு: ~ qiskit.transpiler.passes.Optimize1qGatesDecomposition, சேர்க்கப்பட்டுள்ளது. இந்த டிரான்ஸ்பைலர் பாஸ் தற்போதுள்ள: வர்க்கத்திற்கு மாற்றாகும்: q qiskit.transpiler.passes.Optimize1qGates இது: class:` ~ qiskit.quantum_info.OneQubitEulerDecomposer` வகுப்பைப் பயன்படுத்தி ஒற்றை குவிட் வாயில்களின் சங்கிலியை சிதைத்து எளிமைப்படுத்துகிறது. இந்த முறை எந்த அடிப்படைத் தொகுப்பிற்கும் பொருந்தக்கூடியது: வகுப்பு: ~ qiskit.transpiler.passes.Optimize1qGates u1, u2 மற்றும் u3 க்கு மட்டுமே வேலை செய்கிறது. அடிப்படை தொகுப்பில் u1, u2, அல்லது u3 ஆகியவை அடங்கவில்லையெனில், `` உகப்பாக்கம்_ நிலை`` 1, 2 மற்றும் 3 க்கான இயல்புநிலை பாஸ் நிர்வாகிகள் இந்த புதிய பாஸைப் பயன்படுத்த புதுப்பிக்கப்பட்டுள்ளனர்.
வகுப்பு: ~ qiskit.quantum_info.OneQubitEulerDecomposer இப்போது இரண்டு புதிய அடிப்படைகளை ஆதரிக்கிறது,` 'PSX'` மற்றும்` ' U'`. கட்டமைப்பாளரின் `` அடிப்படை`` குவார்க் மூலம் இவற்றைக் குறிப்பிடலாம். இது மேட்ரிக்ஸை ஒரு சுற்றுக்குள் சிதைக்கும்: வர்க்கம்: ~ qiskit.circuit.library.PGate மற்றும்: class:` ~ qiskit.circuit.library.SXGate` `` PSX'`, மற்றும்: class:` `` 'U'`` க்கான q qiskit.circuit.library.UGate`.
ஒரு புதிய முறை: மெத்: ~ கிஸ்கிட் .ட்ரான்ஸ்பைலர்.பாஸ்மேனேஜர்.ரெமோவ்: வகுப்பு:` கிஸ்கிட் .ட்ரான்ஸ்பைலர்.பாஸ்மேனேஜர்` வகுப்பில் சேர்க்கப்பட்டுள்ளது. இந்த முறை ஒரு: வகுப்பிலிருந்து பாஸை அகற்ற உதவுகிறது: ~ கிஸ்கிட். டிரான்ஸ்பைலர். பாஸ் மேலாளரின் உதாரணம். இது போன்ற குறியீடுகளில் இது செயல்படுகிறது: மெத்: `~ கிஸ்கிட். டிரான்ஸ்பைலர். பாஸ் மேலாளர். பதிலாக. எடுத்துக்காட்டாக,: கிளாஸ் c: `~ கிஸ்கிட் ஐ அகற்ற. டிரான்ஸ்பைலர் .பாஸ். தேர்வுமுறை நிலை 1 இல் பயன்படுத்தப்படும் பாஸ் மேலாளரிடமிருந்து மீட்டமை ஜீரோ ஸ்டேட் பாஸை அகற்று:
from qiskit.transpiler.preset_passmanagers import level_1_pass_manager from qiskit.transpiler.passmanager_config import PassManagerConfig pm = level_1_pass_manager(PassManagerConfig()) pm.draw()
[0] FlowLinear: UnrollCustomDefinitions, BasisTranslator [1] FlowLinear: RemoveResetInZeroState [2] DoWhile: Depth, FixedPoint, Optimize1qGates, CXCancellation
`` [RemoveResetInZeroState`` உடன் `` [1] `` நிலை இதை நீக்கலாம்:
pass_manager.remove(1) pass_manager.draw()
[0] FlowLinear: UnrollCustomDefinitions, BasisTranslator [1] DoWhile: Depth, FixedPoint, Optimize1qGates, CXCancellation
நிகழ்தகவு விநியோகங்களை குவிட் பெருக்கங்களில் ஏற்ற பல வகுப்புகள்; : class: ~ qiskit.circuit.library.UniformDistribution ,: class:` ~ qiskit.circuit.library.NormalDistribution`, மற்றும்: class: q qiskit.circuit.library.LogNormalDistribution ஆகியவை சுற்று நூலகத்தில் சேர்க்கப்பட்டன (: mod: qiskit.circuit.library). இயல்பான மற்றும் பதிவு-இயல்பான விநியோகம் ஒற்றுமையற்ற மற்றும் பன்முகப்படுத்தப்பட்ட விநியோகங்களை ஆதரிக்கிறது. குவாண்டம் அலைவீச்சு மதிப்பீடு பயன்படுத்தப்படும் நிதிகளில் உள்ள பயன்பாடுகளுக்கு இந்த சுற்றுகள் மையமாக உள்ளன.
துடிப்பு வாயில்களுக்கான ஆதரவு: வகுப்பு: ~ qiskit.circuit.QuantumCircuit வகுப்பில் சேர்க்கப்பட்டுள்ளது. இது ஒரு: வர்க்கம்: ~ qiskit.circuit.QuantumCircuit ஐ மேலெழுத (அடிப்படை வாயில்களுக்கு) அல்லது (நிலையான மற்றும் தனிப்பயன் வாயில்களுக்கு) ஒரு: வகுப்பின் வரையறையை குறிப்பிட:` ~ qiskit.circuit.Gate` செயல்பாட்டை நேரத்தின் அடிப்படையில் வன்பொருள் சேனல்கள் முழுவதும் வரிசைப்படுத்தப்பட்ட சமிக்ஞைகள். வேறு வார்த்தைகளில் கூறுவதானால், இது துடிப்பு-நிலை தனிப்பயன் கேட் அளவுத்திருத்தங்களை வழங்குவதற்கான விருப்பத்தை செயல்படுத்துகிறது.
சுற்றுகள் முன்பு போலவே கட்டப்பட்டுள்ளன. உதாரணத்திற்கு:
from qiskit import pulse from qiskit.circuit import QuantumCircuit, Gate class RxGate(Gate): def __init__(self, theta): super().__init__('rxtheta', 1, [theta]) circ = QuantumCircuit(1) circ.h(0) circ.append(RxGate(3.14), [0])
பின்னர், வாயிலுக்கான அளவுத்திருத்தத்தை: class: ~ qiskit.circuit.QuantumCircuit முறை: மெத்:` ~ qiskit.circuit.QuantumCircuit.add_calibration` ஐப் பயன்படுத்தி பதிவு செய்யலாம்: இது ஒரு: வகுப்பு: `~ qiskit.pulse.Schedule `வரையறை மற்றும் இது வரையறுக்கப்பட்டுள்ள குவிட்ஸ் மற்றும் அளவுருக்கள்
# Define the gate implementation as a schedule with pulse.build() as custom_h_schedule: pulse.play(pulse.library.Drag(...), pulse.DriveChannel(0)) with pulse.build() as q1_x180: pulse.play(pulse.library.Gaussian(...), pulse.DriveChannel(1)) # Register the schedule to the gate circ.add_calibration('h', [0], custom_h_schedule) # or gate.name string to register circ.add_calibration(RxGate(3.14), [0], q1_x180) # Can accept gate
முன்னதாக, இந்த செயல்திறன் மட்டுமே முழுமையான பழுப்பு நேரத்தினால் பயன்படுத்தமுடியும். கூடுதலாக, சுற்றுச்சூழல் இப்போது உங்கள் தனிப்பயன் வரையறைகளுடன் பின்னணிக்கு சமர்ப்பிக்கலாம் (பின்னணி ஆதரவைப் பொறுத்து).
பால்ஸ் வாயில்களுடன் மின்சாரம் இன்னும் ஒரு :class:` ~ qiskit.pulse.Schedule ` கூடுதலாக :func:` ~ qiskit.compiler.schedule ` செயல்கூறு பயன்படுத்தப்படுகிறது.
கலிப்ரேட் வாயில் வழக்கமான தொடர் பயிற்சி முறையை பயன்படுத்தி transpiled முடியும்:
transpiled_circuit = transpile(circ, backend)
இடமாற்றம் செய்யப்பட்ட சுற்று அளவீடு செய்யப்பட்ட வாயில்களை அசல் சுற்றுக்கு ஒத்ததாக இருக்கும், மேலும் அவை அடிப்படை வாயில்களுக்கு அவிழ்க்காது.
: வகுப்பை பிரிப்பதற்கான ஆதரவு: ~ qiskit.qobj.PulseQobj பொருள்கள்: func:` qiskit.assembler.disassemble` செயல்பாட்டில் சேர்க்கப்பட்டுள்ளன. உதாரணத்திற்கு:
from qiskit import pulse from qiskit.assembler.disassemble import disassemble from qiskit.compiler.assemble import assemble from qiskit.test.mock import FakeOpenPulse2Q backend = FakeOpenPulse2Q() d0 = pulse.DriveChannel(0) d1 = pulse.DriveChannel(1) with pulse.build(backend) as sched: with pulse.align_right(): pulse.play(pulse.library.Constant(10, 1.0), d0) pulse.shift_phase(3.11, d0) pulse.measure_all() qobj = assemble(sched, backend=backend, shots=512) scheds, run_config, header = disassemble(qobj)
ஒரு புதிய குவார்க், `` coord_type`` இல் சேர்க்கப்பட்டுள்ளது: func: qiskit.visualization.plot_bloch_vector. உருவாக்கப்பட்ட காட்சிப்படுத்தலில் ப்ளொச் கோளத்தில் திசையனின் நிலைப்பாட்டை விவரிக்கும் உள்ளீட்டு அளவுருவுக்கு பயன்படுத்தப்படும் ஒருங்கிணைப்பு அமைப்பை மாற்ற இந்த குவார்க் உதவுகிறது. இந்த புதிய குவார்க்குக்கு 2 ஆதரவு மதிப்புகள் உள்ளன, `` 'கார்ட்டீசியன்`` (இயல்புநிலை மதிப்பு) மற்றும்
' கோள வடிவம். `` Coord_type`` kwarg `` 'கோள வடிவமாக` அமைக்கப்பட்டால், எடுக்கப்பட்ட அளவுருக்களின் பட்டியல் `` [r, theta, phi] `` எங்கே `` r`` ஆரம், ` தீட்டா என்பது + z திசையிலிருந்து வரும் சாய்வு, மற்றும்` ஃபை என்பது + x திசையிலிருந்து வரும் அசிமுத் ஆகும். உதாரணத்திற்கு:from numpy import pi from qiskit.visualization import plot_bloch_vector x = 0 y = 0 z = 1 r = 1 theta = pi phi = 0 # Cartesian coordinates, where (x,y,z) are cartesian coordinates # for bloch vector plot_bloch_vector([x,y,z])
plot_bloch_vector([x,y,z], coord_type="cartesian") # Same as line above
# Spherical coordinates, where (r,theta,phi) are spherical coordinates # for bloch vector plot_bloch_vector([r, theta, phi], coord_type="spherical")
துடிப்பு: py: class: ~ qiskit.pulse.Schedule பொருள்கள் இப்போது இதைப் பயன்படுத்துவதை ஆதரிக்கின்றன: py: class:` ~ qiskit.circuit.ParameterExpression` அளவுருக்கள் பொருள்கள்.
உதாரணத்திற்கு:
from qiskit.circuit import Parameter from qiskit import pulse alpha = Parameter('⍺') phi = Parameter('ϕ') qubit = Parameter('q') amp = Parameter('amp') schedule = pulse.Schedule() schedule += SetFrequency(alpha, DriveChannel(qubit)) schedule += ShiftPhase(phi, DriveChannel(qubit)) schedule += Play(Gaussian(duration=128, sigma=4, amp=amp), DriveChannel(qubit)) schedule += ShiftPhase(-phi, DriveChannel(qubit))
அளவுரு ஒதுக்கீடு: மெத்: ~ qiskit.pulse.Schedule.assign_parameters முறை வழியாக செய்யப்படுகிறது:
schedule.assign_parameters({alpha: 4.5e9, phi: 1.57, qubit: 0, amp: 0.2})
வெளிப்பாடுகள் மற்றும் பகுதி ஒதுக்கீடும் செயல்படுகின்றன, அதாவது:
beta = Parameter('b') schedule += SetFrequency(alpha + beta, DriveChannel(0)) schedule.assign_parameters({alpha: 4.5e9}) schedule.assign_parameters({beta: phi / 6.28})
ஒரு புதிய காட்சிப்படுத்தல் செயல்பாடு: func: ~ qiskit.visualization.timeline_drawer: mod:` qiskit.visualization` தொகுதிக்கு சேர்க்கப்பட்டது.
உதாரணத்திற்கு:
from qiskit.visualization import timeline_drawer from qiskit import QuantumCircuit, transpile from qiskit.test.mock import FakeAthens qc = QuantumCircuit(2) qc.h(0) qc.cx(0,1) timeline_drawer(transpile(qc, FakeAthens(), scheduling_method='alap'))
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
வகுப்பு: ~ qiskit.circuit.Gate வகுப்பு மற்றும் அதன் துணைப்பிரிவுகளுக்கான கட்டமைப்பாளரின்` அளவுருக்கள்` குவார்க்கை சரிபார்க்கவும். முன்பு அனைத்தும்: வகுப்பு : ~ qiskit.circuit.Gate அளவுருக்கள்: class:` ~ qiskit.circuit.Instruction` வகுப்பில் வரையறுக்கப்பட்ட அனுமதிக்கப்பட்ட வகைகளின் தொகுப்பில் இருக்க வேண்டும். இப்போது ஒரு புதிய முறை ,: மெத்: ~ qiskit.circuit.Gate.validate_parameter ஒரு அளவுரு வகை செல்லுபடியாகுமா இல்லையா என்பதை தீர்மானிக்க பயன்படுத்தப்படுகிறது. துணைப்பிரிவில் இந்த முறையின் வரையறை அதன் பெற்றோரை விட முன்னுரிமை பெறும். முன்னாள்.
முந்தைய தவறான முறைமைகளும், உரையாடல், மற்றும் பண்புகள் ` ` n_ qubits ` ` ` ` ` numberofqubits ` ` நீக்கப்பட்டுள்ளன. இவை 0.13.0 விடுதலை செய்யப்பட்டன. மாற்றங்களின் முழு அமைப்பு:
வகுப்பு
பழைய
புதிய
`` n_qubits
: வகுப்பு: ~ qiskit.circuit.QuantumCircuit
: வகுப்பு: `~ qiskit.quantum_info.Pauli
qubits இன் எண்ணிக்கை
:attr:` ~ qiskit.quantum_info.Pauli.num_qubits `
செயல்கூறு
பழைய ஆர்குமென்ட்
புது ஆர்குமென்ட்
:func:` qiskit.circuit.random.random_circuit `
`` n_qubits
` ` num_qubits ` `
:class:` qiskit.circuit.library.MSGate`
`` n_qubits
` ` num_qubits ` `
ஒரு parameter-ச் செருகுவது :class: ~ qiskit.circuit.Gate instance ஒரு :class:` ~ qiskit.circuit.QuantumCircuit` இப்போது அந்த வாயிலின் நகலை உருவாக்குகிறது, இது circuitகளில் பயன்படுத்தப்படுகிறது. circuitக்குள் செருகப்பட்ட instanceல் மாற்றங்கள் செய்யப்பட்டால், அது இனி circuitல் உள்ள வாயிலில் பிரதிபலிக்காது. ஒற்றை parameter ஆக்கப்பட்ட :class: ~ qiskit.circuit.Gate object-ஐ பல circuitகளில் செருகும்போது சிக்கலை சரிசெய்ய இந்த மாற்றம் செய்யப்பட்டது.
The function :func:` qiskit.result.marginal_counts ` now, by default, does not modify the :class:` qiskit.result.Result ` instance parameter. முன்னதாக, ` ` Result ` ` பொருள் எப்போதும் இடத்தில் மாற்றப்பட்டது. ஒரு புதிய kwarg ` ` inplace ` ` inplace ` :func:` ~ qiskit.result.marginal_counts ` ` inplace=True ` ` அமைக்கப்பட்டிருக்கும் போது முந்தைய நடத்தை பயன்படுத்துகிறது.
The
U3Gatedefinition has been changed to be in terms of theUGateclass. TheUGateclass has no definition. It is therefore not possible to unroll every circuit in terms of U3 and CX anymore. Instead, U and CX can be used for every circuit.Python 3.5 உடன் Qiskit டெர்ராவை இயக்குவதற்கான ஆதரவு நீக்கப்பட்டது. இந்த வெளியீட்டில் இருந்து Qiskit டெர்ராவைப் பயன்படுத்த நீங்கள் இப்போது குறைந்தபட்சம் Python 3.6 ஐப் பயன்படுத்த வேண்டும். நீங்கள் Python 3.5 ஐப் பயன்படுத்துகிறீர்கள் என்றால், வேலை செய்யும் கடைசி பதிப்பு Qiskit டெர்ரா 0.15.2 ஆகும்.
In the
PulseBackendConfigurationin thehamiltonianattributes thevarsfield is now returned in a unit of Hz instead of the previously used GHz. This change was made to be consistent with the units used with the other attributes in the class.The previously deprecated support for passing in a dictionary as the first positional argument to
DAGNodeconstructor has been removed. Using a dictonary for the first positional argument was deprecated in the 0.13.0 release. To create aDAGNodeobject now you should directly pass the attributes as kwargs on the constructor.சர்க்யூட் கேட் முறைகளுக்கான முக்கிய ஆர்குமென்ட்கள் (எடுத்துக்காட்டாக :class: qiskit.circuit.QuantumCircuit.cx)` q`,` ctl* , மற்றும் tgt* , அவை நீக்கப்பட்டன 0.12.0 வெளியீட்டில் அகற்றப்பட்டது. அதற்கு பதிலாக, இந்த முறைகளுக்கு பெயரிடப்பட்ட ஆர்குமென்ட்களாக ` qubit``, `` control_qubit* `` மற்றும் `` target_qubit* `` மட்டுமே பயன்படுத்த முடியும்.
முன்னர் நீக்கப்பட்ட தொகுதி `` கிஸ்கிட். நீட்டிப்புகள். நிலையான`` அகற்றப்பட்டது. 0.14.0 வெளியீட்டிலிருந்து இந்த தொகுதி நீக்கப்பட்டது. அதற்கு பதிலாக: மொட் : qகிஸ்கிட்.சர்க்யூட்.லைப்ரரி `. இதில் உலகளாவிய ஆர் வாயில் (:கிளாஸ் : ~ கிஸ்கிட்.சர்க்யூட்.லைப்ரரி .ஜி ஆர் ), உலகளாவிய ஆர் எக்ஸ் ஐப் பயன்படுத்தலாம். கூடுதலாக, `` கிஸ்கிட். நீட்டிப்புகள். நிலையான`` இல் உள்ள அனைத்து கேட் வகுப்புகளும் இன்னும் இறக்குமதி செய்யப்படுகின்றன: மொட் : கிஸ்கிட். நீட்டிப்புகள்.
The previously deprecated gates in the module
qiskit.extensions.quantum_initializer:DiagGate, UCG`,UCPauliRotGate,UCRot,UCRXGate,UCX,UCRYGate,UCY,UCRZGate,UCZhave been removed. These were all deprecated in the 0.14.0 release and have alternatives available in the circuit library (qiskit.circuit.library).The previously deprecated
qiskit.circuit.QuantumCircuitgate methodiden()has been removed. This was deprecated in the 0.13.0 release andi()orid()can be used instead.
தேய்மான குறிப்புகள்¶
The use of a
numpy.ndarrayfor a parameter in theparamskwarg for the constructor of theGateclass and subclasses has been deprecated and will be removed in future releases. This was done as part of the refactoring of howparmstype checking is handled for theGateclass. If you have a custom gate class which is a subclass ofGatedirectly (or via a different parent in the hierarchy) that accepts anndarrayparameter, you should define a customvalidate_parameter()method for your class that will return the allowed parameter type. For example:def validate_parameter(self, parameter): """Custom gate parameter has to be an ndarray.""" if isinstance(parameter, numpy.ndarray): return parameter else: raise CircuitError("invalid param type {0} in gate " "{1}".format(type(parameter), self.name))
PiecewiseLinearPauliRotationsஇன் பண்புnum_ancilla_qubitsமற்றும்PolynomialPauliRotationsஎதிர்கால வெளியீட்டில் அகற்றப்படும். அதற்கு பதிலாக :attr: ~ qiskit.circuit.library.PolynomialPauliRotations.num_ancillas பயன்படுத்தப்பட வேண்டும். :class: ~ qiskit.circuit.QuantumCircuit முறை :meth:` ~ qiskit.circuit.QuantumCircuit.num_ancillas` உடன் ஒத்துப்போக இது செய்யப்பட்டது.The
qiskit.circuit.library.MSGateclass has been deprecated, but will remain in place to allow loading of old jobs. It has been replaced with theqiskit.circuit.library.GMSclass which should be used instead.The
MSBasisDecomposertranspiler pass has been deprecated and will be removed in a future release. Theqiskit.transpiler.passes.BasisTranslatorpass can be used instead.The
QuantumCircuitmethodsu1,u2andu3are now deprecated. Instead the following replacements can be used.u1(theta) = p(theta) = u(0, 0, theta) u2(phi, lam) = u(pi/2, phi, lam) = p(pi/2 + phi) sx p(pi/2 lam) u3(theta, phi, lam) = u(theta, phi, lam) = p(phi + pi) sx p(theta + pi) sx p(lam)
கேட் வகுப்புகள் :class: ~ qiskit.circuit.library.U1Gate , :class:` ~ qiskit.circuit.library.U2Gate` மற்றும் :class: ~ qiskit.circuit.library.U3Gate பழைய வேலைகளை ஏற்ற அனுமதிக்க உள்ளன.
பிழை திருத்தங்கள்¶
The
Resultclass's methodsdata(),get_memory(),get_counts(),get_unitary(), andget_statevector ` will now emit a warning when the ``experiment`()kwarg is specified for attempting to fetch results using either aQuantumCircuitorScheduleinstance, when more than one entry matching the instance name is present in theResultobject. Note that only the first entry matching this name will be returned. Fixes #3207The
qiskit.circuit.QuantumCircuitmethodappend()can now be used to insert one parameterized gate instance into multiple circuits. This fixes a previous issue where inserting a single parameterizedGateobject into multiple circuits would cause failures when one circuit had a parameter assigned. Fixes #4697Previously the
qiskit.execute.execute()function would incorrectly disallow both thebackendandpass_managerkwargs to be specified at the same time. This has been fixed so that bothbackendandpass_managercan be used together on calls toexecute(). Fixes #5037The
QuantumCircuitmethodunitary()method has been fixed to accept a single integer for theqargargument (when adding a 1-qubit unitary). The allowed types for theqargsargument are nowint,Qubit, or a list of integers. Fixes #4944முன்னதாக, அழைப்பு :meth: ~ qiskit.circuit.library.BlueprintCircuit.inverse இல் ஒரு :class:` ~ qiskit.circuit.library.BlueprintCircuit` object அதன் உள் தரவு பண்பு தொகை இல்லாவிட்டால் தோல்வியடையும். இது சரி செய்யப்பட்டது, இதனால் அழைப்பு :meth: qiskit.circuit.library.BlueprintCircuit.inverse circuitக்கு நேர்மாறாக உருவாக்கும் முன் உள் தரவை விரிவுபடுத்துகிறது. திருத்தம் # 5140 <https://github.com/Qiskit/qiskit-terra/issues/5140> __
Fixed an issue when creating a
qiskit.result.Countsobject from an empty data dictionary. Now this will create an emptyCountsobject. Themost_frequent()method is also updated to raise a more descriptive exception when the object is empty. Fixes #5017Fixes a bug where setting
ctrl_stateof aUnitaryGatewould be applied twice; once in the creation of the matrix for the controlled unitary and again when calling thedefinition()method of theqiskit.circuit.ControlledGateclass. This would give the appearence that settingctrl_statehad no effect.Previously the
ControlledGatemethodinverse()would not preserve thectrl_stateparameter in some cases. This has been fixed so that callinginverse()will preserve the valuectrl_statein its output.சர்க்யூட் டிராயரின் `` எம்.பி.எல்`` வெளியீட்டு பின்தளத்தில் ஒரு பிழை சரி செய்யப்பட்டது: மெத்: qiskit.circuit.QuantumCircuit.draw மற்றும்: func:` qiskit.visualization.circuit_drawer` இது டிராயரை செயலிழக்கச் செய்தால் `` நடை`` குவார்க் ஒரு சரத்திற்கு அமைக்கப்பட்டது. காட்சிப்படுத்தலுக்கான நடை தாளைக் கொண்ட ஒரு JSON கோப்பிற்கான பாதையாக அந்த சரத்தை கருதுவதே சரியான நடத்தை. இது சரி செய்யப்பட்டது, மற்றும் ஸ்டைல் ஷீட்டிற்கான JSON கோப்பை ஏற்ற முடியாவிட்டால் எச்சரிக்கைகள் எழுப்பப்படுகின்றன.
QASM கோப்பை இதன் மூலம் ஏற்றுவதில் பிழை சரி செய்யப்பட்டது: மெத்: ~ qiskit.circuit.QuantumCircuit.from_qasm_file அல்லது: மெத்:` ~ qiskit.circuit.QuantumCircuit.from_qasm_str` ஒரு `` u``, `` கட்டம் ( p) QASM கோப்பில்
, `` sx, அல்லது `` sxdg`` கேட் இருந்தன. திருத்தங்கள் `# 5156ஒரே ஒரு 2-குவிட் செயல்பாட்டைக் கொண்டு வரையறுக்கப்பட்ட ஒரு வாயிலை அவிழ்த்து / சிதைக்கும்போது பதிவேடுகளில் பொருந்தாத ஒரு பிழை சரி செய்யப்பட்டது.
Aer 0.7.0¶
முன்னுரை¶
இந்த 0. 7. 0 விடுதலை பல செயல்திறன் முன்னேற்றங்கள் மற்றும் குறிப்பிடத்தக்க மேம்பாட்டு உரிமைகள் ஆகியவற்றை உள்ளடக்குகிறது, மற்றும் பைதான் 3.5 க்கு ஆதரவு தரும். முக்கிய இடைமுகப்பு மாற்றங்கள் வடிவமைப்புத் துணை பின்னணி, மற்றும் IBMQ பின்னணிகளில் இருந்து முன் வடிவமைக்கப்பட்ட உரையாடல் வடிவமைப்புகள். Noise model an basis gate support has also been extended for most of the Qiskit circuit library standard gates, including new support for 1 and 2-qubit சுழற்சி வாயுக்கள். பெரும்பாலான முன்னுரிமைகளில் SIMD ஆதரவு சேர்க்கும் அடர்த்தி மெட்ரிக்ஸ் மற்றும் ஒருங்கிணைந்த மின்சார முறைமைகளுக்கு, பயன்படுத்தப்பட்ட நினைவகத்தை குறைக்கவும் மற்றும் செயல்திறன் மற்றும் அடர்த்தி மெட்ரிக்ஸ் இன்ட்ரிக்ஸ் ஸ்பெக்ஸ்போஸ் ஆகியவற்றின் செயல்திறனை மேம்படுத்தும், மற்றும் கேரஸ் ஆணைக்குழுவுக்கு ஆதரவு சேர்க்கிறது.
புதிய அம்சங்கள்¶
வகுப்பிற்கான அடிப்படை வாயில் ஆதரவைச் சேர்க்கிறது: qiskit.circuit.Delay இன் அறிவுறுத்தல்: வகுப்பு:` ~ qiskit.providers.aer.StatevectorSimulator` ,: வகுப்பு: ~ qiskit.providers.aer.UnitarySimulator, மற்றும்: class : ~ qiskit.providers.aer.QasmSimulator. உருவகப்படுத்துதலின் போது இந்த வாயில் அடையாள வாயிலாக கருதப்படுகிறது மற்றும் தாமத நீள அளவுரு புறக்கணிக்கப்படுகிறது என்பதை நினைவில் கொள்க.
வகுப்பு , மற்றும் " ஸ்டேட்வெக்டர் " , " அடர்த்தி_மாட்ரிக்ஸ் " , " மேட்ரிக்ஸ்_ உற்பத்தி_நிலையம் " , மற்றும் " நீட்டிக்கப்பட்ட_நிலையாக்கி " முறைகள்: வர்க்கம்: ~ qiskit.providers.aer. QasmSimulator`.
கட்ட வாயிலுக்கு அடிப்படை கேட் ஆதரவைச் சேர்க்கிறது: வகுப்பு: qiskit.circuit.library.PhaseGate: வகுப்பிற்கு:` ~ qiskit.providers.aer.StatevectorSimulator` ,: வகுப்பு: ~ qiskit.providers.aer.StatevectorSimulator, : class: ~ qiskit.providers.aer.UnitarySimulator, மற்றும்` " statevector " , " அடர்த்தி_மாட்ரிக்ஸ் " , " matrix_product_state " , மற்றும் " நீட்டிக்கப்பட்ட_நிலையாக்கி " முறைகள் வகுப்பு: `~ qiskit.providers.aer.QasmSimulator.
கட்டுப்படுத்தப்பட்ட-கட்ட வாயிலுக்கு அடிப்படை வாயில் ஆதரவைச் சேர்க்கிறது: வகுப்பு: qiskit.circuit.library.CPhaseGate: வகுப்பிற்கு:` ~ qiskit.providers.aer.StatevectorSimulator` ,: வகுப்பு: ~ qiskit.providers.aer.StatevectorSimulator `,: வகுப்பு: ~ qiskit.providers.aer.UnitarySimulator`, மற்றும் `` "ஸ்டேட்வெக்டர்" ``, `` "அடர்த்தி_மாட்ரிக்ஸ்" ``, மற்றும் `` "மேட்ரிக்ஸ்_ உற்பத்தி_நிலையம்" `` முறைகள்: வர்க்கம்: ~ qiskit.providers.aer.QasmSimulator.
பல கட்டுப்பாட்டு கட்ட வாயிலுக்கு ஆதரவைச் சேர்க்கிறது: வகுப்பு: qiskit.circuit.library.MCPhaseGate: வகுப்பிற்கு:` ~ qiskit.providers.aer.StatevectorSimulator` ,: வகுப்பு: ~ qiskit.providers.aer.UnitarySimulator , மற்றும் `` "ஸ்டேட்வெக்டர்" `` முறை: வர்க்கம்: ~ qiskit.providers.aer.QasmSimulator.
Adds support for the \(\sqrt(X)\) gate
qiskit.circuit.library.SXGateto theStatevectorSimulator,UnitarySimulator, andQasmSimulator.1 மற்றும் 2-குவிட் கிஸ்கிட் சுற்று நூலக சுழற்சி வாயில்களுக்கான ஆதரவைச் சேர்க்கிறது: வகுப்பு: ~ qiskit.circuit.library.RXGate ,: வகுப்பு:` ~ qiskit.circuit.library.RYGate` ,: வகுப்பு: ~ qiskit.circuit. library.RZGate ,: வகுப்பு: ~ qiskit.circuit.library.RGate ,: வகுப்பு:` ~ qiskit.circuit.library.RXXGate` ,: வகுப்பு: ~ qiskit.circuit.library.RYYGate ,: வகுப்பு: ~ qiskit.circuit.library.RZZGate ,: வகுப்பு:` ~ qiskit.circuit.library.RZXGate` க்கு: வகுப்பு: ~ qiskit.providers.aer.StatevectorSimulator ,: வகுப்பு:` ~ qiskit.providers.aer .உனிட்டரி சிமுலேட்டர்`, மற்றும் `` "ஸ்டேட்வெக்டர்" `` மற்றும் `` "அடர்த்தி_மாட்ரிக்ஸ்" `` முறைகள்: வர்க்கம்: ~ qiskit.providers.aer.QasmSimulator. #: ../../release_notes.rst:1818
பல கட்டுப்பாட்டு கட்ட வாயிலுக்கு ஆதரவைச் சேர்க்கிறது: வகுப்பு: qiskit.circuit.library.MCPhaseGate: வகுப்பிற்கு:` ~ qiskit.providers.aer.StatevectorSimulator` ,: வகுப்பு: ~ qiskit.providers.aer.UnitarySimulator , மற்றும் `` "ஸ்டேட்வெக்டர்" `` முறை: வர்க்கம்: ~ qiskit.providers.aer.QasmSimulator.
வடிவமைப்பை வடிவமைக்க முடியும். இது ஒவ்வொரு ஒருங்கிணைக்கும் பின்னணி பொருளாக ஒலிக்கோப்பு முறை மற்றும் ஒளி மாதிரி போன்றவற்றை அமைக்க அனுமதிக்கும்.
வகுப்பு: ~ qiskit.providers.aer.QasmSimulator மற்றும்: class:` ~ qiskit.providers.aer.PulseSimulator` ஐ ஒரு: வகுப்பிலிருந்து கட்டமைக்க முடியும்: q qiskit.providers.ibmq.IBMQBackend பின்தளத்தில் பொருள் : மெத்: ~ qiskit.providers.aer.QasmSimulator.from_backend` முறை. வகுப்புக்கு: ~ qiskit.providers.aer.QasmSimulator இது பின்தளத்தில் உள்ளமைவு மற்றும் பண்புகளின் அடிப்படையில் இணைப்பு வரைபடம், அடிப்படை வாயில்கள் மற்றும் அடிப்படை சாதன இரைச்சல் மாதிரியை உள்ளமைக்கும். வகுப்புக்கு: ~ qiskit.providers.aer.PulseSimulator கணினி மாதிரி மற்றும் இயல்புநிலைகள் பின்தளத்தில் உள்ளமைவு, பண்புகள் மற்றும் இயல்புநிலைகளிலிருந்து தானாகவே கட்டமைக்கப்படும்.
எடுத்துக்காட்டாக ஒரு நச்சுவான அடர்த்தி மெட்ரிக்ஸ் பாக்டிரிக்ஸ் பின்னணி ` ` QasmSimulator (method = 'density_matrix', Noe_ model = நுழை_ மாதிரி) ` `, அல்லது ஒரு வர்த்தக மேட்ரிக்ஸ் உற்பத்தி மாநிலமாகும் ` ` QasmSimulator (method = 'matrix_product_state') ` `.
ஒரு நன்மை என்னவென்றால்: ஒரு வகுப்பு: ~ qiskit.providers.aer.PulseSimulator உதாரணம் ஒரு பின்தளத்தில் இருந்து கட்டமைக்கப்பட்டிருப்பது அசல் பின்தளத்தில் மாற்றுவதற்கான ஒரு துளி-மாற்றாக சிறப்பாக செயல்படுகிறது, இது ஒரு சிமுலேட்டர் மற்றும் உண்மையான பின்தளத்தில் மாற்றுவதை எளிதாக்குகிறது, எ.கா. உண்மையான பின்தளத்தில் பயன்படுத்துவதற்கு முன்பு ஒரு சிமுலேட்டரில் குறியீட்டை சோதிக்கும் போது. எடுத்துக்காட்டாக, பின்வரும் குறியீடு-தொகுதியில், வகுப்பு: ~ qiskit.providers.aer.PulseSimulator என்பது` போலிஅர்மோங்க் () பின்தளத்தில் இருந்து உடனடிப்படுத்தப்படுகிறது. எல்லா உள்ளமைவு மற்றும் இயல்புநிலை தரவுகளும் சிமுலேட்டர் நிகழ்வில் நகலெடுக்கப்படுகின்றன, எனவே இது ` அசெம்பிள்``க்கான வாதமாக அனுப்பப்படும்போது, அசல் பின்தளத்தில் வழங்கப்பட்டதைப் போலவே இது செயல்படுகிறது (எ.கா. ஃபேக்அர்மோன்க் இலிருந்து இயல்புநிலைகள் இருக்கும் மற்றும் `` அசெம்பிள்`` ஆல் பயன்படுத்தப்படுகிறது).
armonk_sim = qiskit.providers.aer.PulseSimulator.from_backend(FakeArmonk()) pulse_qobj = assemble(schedules, backend=armonk_sim) armonk_sim.run(pulse_qobj)
மேலிருக்கும் உதாரணம் சிறியதாகக் கூடும் போது, விரிவான 'drop-in replacement' நடவடிக்கை மேலும் சிக்கலான வேலைகளில் உபயோகத்தை மேம்படுத்துவது, எ. கா, எ. கா.
Qobj உலகளாவிய கட்டத்திற்கான ஆதரவை: class: ~ qiskit.providers.aer.StatevectorSimulator ,: class:` ~ qiskit.providers.aer.UnitarySimulator`, மற்றும்: class: ~ qiskit.providers இன் மாநிலவெக்டர் முறைகள் aer.QasmSimulator.
பொதுவான ஒழுங்குபடுத்தும் மாதிரிகளை ஒழுங்குபடுத்துவதால் கேரஸ் (Kraus) முறை (Kraus) முறை (Kraus) முறைமையை சேர்த்துக் கொள்கிறது.
"Statevector" ` and ` density_matrix "` ` density_matrix" என்பது :class:` ~ qiskit.देगा வழிமுறைகளுக்கான நடவடிக்கை மற்றும் அடர்த்தி மாதிரிகளை பயன்படுத்தவும். இது குறியீடுகளின் நினைவக பயன்பாட்டை குறைக்கிறது, முடிவுகளின் ஒரு பெரிய அர்ரே நகலெடுக்கும் செயல்திறனை அளிக்கிறது.
பொது க்ராஸிற்கான ஆதரவைச் சேர்க்கிறது: வர்க்கம்: ~ qiskit.providers.aer.noise.QauntumError கேட் பிழைகள்: வகுப்பில்:` ~ qiskit.providers.aer.noise.NoiseModel` ஐ `` "matrix_product_state" `` முறைக்கு வகுப்பு: ~ qiskit.providers.aer.QasmSimulator.
அடர்த்தி மேட்ரிக்ஸ் ஸ்னாப்ஷாட் அறிவுறுத்தலுக்கான ஆதரவைச் சேர்க்கிறது: வகுப்பு: qiskit.providers.aer.extensions.SnapshotDensityMatrix ஐ` " matrix_product_state " முறை: வகுப்பின் முறை: ~ qiskit.providers.aer.QasmSimulator`.
யூனிடரி மேட்ரிக்ஸ், சூப்பர் ஆபரேட்டர் மேட்ரிக்ஸ் மற்றும் அடர்த்தி மேட்ரிக்ஸ் சிமுலேஷன் முறைகளுக்கு ஸ்டேட்வெக்டர் சிமுலேஷன் முறையின் சிம்டி திசையன்மயமாக்கலை நீட்டிக்கிறது. இது வகுப்பைப் பயன்படுத்தி 2x செயல்திறன் அதிகரிக்கும் பொது உருவகப்படுத்துதலை அளிக்கிறது: ~ qiskit.providers.aer.UnitarySimulator,` " அடர்த்தி_மாட்ரிக்ஸ் " : வர்க்கத்தின் முறை: ~ qiskit.providers.aer.QasmSimulator`, கேட் இணைவு மற்றும் சத்தம் உருவகப்படுத்துதல்.
பைபிண்ட் 11 உடன் சிறந்த ஒருங்கிணைப்பைக் கொண்ட சி ++ குறியீட்டில் தனிப்பயன் திசையன் வகுப்பைச் சேர்க்கிறது. இறுதி சிமுலேட்டர் நிலையின் பைதான் பிணைப்பின் போது நினைவக நகலைத் தவிர்ப்பதன் மூலம்: வர்க்கம்: ~ qiskit.providers.aer.StatevectorSimulator இன் நினைவகத் தேவையை இது கொண்டுள்ளது.
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
AER இப்போது சில மாட்ரிக்ஸ் தொடர்பான கணினிகளை செயல்படுத்துவதற்கு பயன்படுகிறது. இது OpenBlas (ஏற்கனவே Linux and Macos සාමාන්ය OpenBlas dsitributions; விண்டோஸ் பதிப்பு AER with AER) அல்லது MacOS இல் ஆரம்ப வரையறையுடன் பகிர்ந்துகொண்டிருக்கும் லாபக் நூலகத்தை பயன்படுத்துகிறது.
Python 3.5 உடன் Qiskit டெர்ராவை இயக்குவதற்கான ஆதரவு நீக்கப்பட்டது. இந்த வெளியீட்டில் இருந்து Qiskit டெர்ராவைப் பயன்படுத்த நீங்கள் இப்போது குறைந்தபட்சம் Python 3.6 ஐப் பயன்படுத்த வேண்டும். நீங்கள் Python 3.5 ஐப் பயன்படுத்துகிறீர்கள் என்றால், வேலை செய்யும் கடைசி பதிப்பு Qiskit டெர்ரா 0.15.2 ஆகும்.
புதுப்பிக்கப்படுவதற்கு முன்னிருப்பு மூலமாகக் கொண்டு வரையறுக்கப்பட்டிருக்கும் விகிதங்கள் :class:` ~ qiskit.வர்கள் மற்றும் :class:` ~ qiskit.देगा நபர். Qasmulator `.
வர்க்கத்தின் `` "அடர்த்தி_மாட்ரிக்ஸ்" `` முறைக்கு: ~ qiskit.providers.aer.QasmSimulator மற்றும்: வர்க்கம்:` ~ qiskit.providers.aer.UnitarySimulator` கேட் இணைவு அதிக சுற்றுகள் கொண்ட சுற்றுகளுக்கு பயன்படுத்தப்படும் 7 குவிட்களை விட.
தனிப்பயன் குவிட் வாசல் மதிப்புகளை `` ஃப்யூஷன்_தெரெஷோல்ட்`` பின்தளத்தில் விருப்பத்தைப் பயன்படுத்தி அமைக்கலாம், அதாவது `` பின்தளத்தில்.செட்_ஆப்ஷன்ஸ் (ஃப்யூஷன்_தெஷோல்ட் = 10)
ஓப்பன்எம்பி குவிட் த்ரெஷோல்ட் அளவுருவின் நடத்தைக்கு பொருந்த, குவிட்டுகளின் எண்ணிக்கை வாசலுக்கு மேலே இருக்கும்போது, வாசலுக்கு சமமாகவோ அல்லது வாசலுக்கு மேலேவோ இருக்கும்போது இணைவு பயன்படுத்த `` ஃப்யூஷன்_தெரெஷோல்ட்`` பின்தளத்தில் விருப்பத்தை மாற்றுகிறது.
தேய்மான குறிப்புகள்¶
: meth: qiskit.providers.aer.noise.NoiseModel.set_x90_single_qubit_gates தனிப்பயன் அடிப்படை வாயில்களுக்கு அன்ரோல் செய்வது கிஸ்கிட் டிரான்ஸ்பைலரில் சேர்க்கப்பட்டுள்ளதால் நீக்கப்பட்டது. எக்ஸ் 90 அடிப்படையிலான இரைச்சல் மாதிரியைப் பயன்படுத்துவதற்கான சரியான வழி சதுர (எக்ஸ்) `` "எஸ்எக்ஸ்" `` அல்லது `` "ஆர்எக்ஸ்" `` வாயில் மற்றும் ஒற்றை-குவிட் கட்ட வாயில்களில் ஒன்றான `` "யு 1" இரைச்சல் மாதிரியில் ``, `` "rx" `` அல்லது `` "ப" ``.
ஸ்னாப்ஷாட் அறிவுறுத்தல்களின் `` மாறுபாடு`` குவார்க் நீக்கப்பட்டது. இந்த செயல்பாடு சத்தம் மாதிரி மாதிரியின் காரணமாக ஸ்னாப்ஷாட்டில் உள்ள மாதிரி மாறுபாட்டைக் கணக்கிட்டது, அளவீட்டு புள்ளிவிவரங்கள் காரணமாக மாறுபாடு அல்ல, எனவே பெரும்பாலும் தவறாகப் பயன்படுத்தப்படுகிறது. சத்தம் மாடலிங் மாறுபாடு தேவைப்பட்டால் ஒற்றை ஷாட் ஸ்னாப்ஷாட்களைப் பயன்படுத்த வேண்டும், எனவே மாறுபாட்டை பிந்தைய செயலாக்கத்தில் கைமுறையாக கணக்கிடலாம்.
பிழை திருத்தங்கள்¶
பிழை: வகுப்பில் பிழைகளை சரிசெய்கிறது: ~ qiskit.providers.aer.StatevectorSimulator இது எப்போதும் AVX2 உடன் கணினிகளில் அல்லது ஒற்றை துல்லியம் அல்லது ஜி.பீ. பின்தளத்தில் விருப்பங்களில் குறிப்பிடப்பட்டுள்ளது.
C++ குறியீட்டில் உள்ள சில-லூப்ஸ் (C++ குறியீடுகள்) உள்ளடக்க உறுப்புகளை குறிப்பிடுவதற்கு பதிலளிக்கும்.
எப்போதும் எப்போதும் நகர்த்தப்படுவதை விட எப்பொழுதும் C++ ல் இருந்து எப்போதும் நகலெடுக்கப்பட்டிருக்கும் ஒரு பிழை நீக்குகிறது. இது நினைவக பயன்பாடு மற்றும் பெரிய மாதிரிகளை அல்லது அடர்த்தி மாட்ரிக்ஸ் ஸான்ஸ்போட் பயன்படுத்தும்போது நினைவகத்தை மேம்படுத்தும்.
நிலைப்படுத்தி சிமுலேட்டரில் சரியான Y எதிர்பார்ப்பு மதிப்பைத் தர மாநில:: ஸ்னாப்ஷாட்_பாலி_எக்ஸ்பால் ஐ சரிசெய்யவும். மேலும் விவரங்களுக்கு # 895 <https://github.com/Qiskit/qiskit-aer/issues/895> ஐப் பார்க்கவும்.
கட்டுப்பாட்டின் செயல்பாடு செயல்பாடு (பொருட்கள்) இலவச செயல்பாடுகளுக்கு மேலாக அமைக்கப்பட்டுள்ளது. மற்ற விஷயங்களுள் இவற்றை பெரும்பான்மையானவற்றில் பயன்படுத்தப்படுவதற்கு அனுமதிக்கிறது.
: Class: q qiskit.providers.aer.StatevectorSimulator மற்றும்: class:` ~ qiskit.providers.aer.UnitarySimulator` க்கான கிடைக்காத நினைவக சோதனைகளைச் சேர்க்கவும். ஒரு சுற்றில் உள்ள குவிட்களின் எண்ணிக்கையை உருவகப்படுத்த தேவையான நினைவகம் கணினியின் கிடைக்கக்கூடிய நினைவகத்தை விட அதிகமாக இருந்தால் இது விதிவிலக்கு.
Ignis 0.5.0¶
முன்னுரை¶
இந்த வெளியீட்டில் எதிர்பார்ப்பு மதிப்பு அளவீட்டு பிழை தணிப்பு, குவாண்டம் தொகுதி சோதனைகளுக்கான மேம்பட்ட சதி செயல்பாடு, பல பிழை திருத்தங்கள் மற்றும் பைத்தான் 3.5 க்கான ஆதரவைக் கொண்டுள்ளது.
புதிய அம்சங்கள்¶
: Func: qiskit.ignis.verification.randomized_benchmarking.randomized_benchmarking_seq செயல்பாடு கேட் பொருள்களின் விருப்ப உள்ளீட்டை` interleaved_elem` என அனுமதிக்கிறது. கூடுதலாக, சி.என்.ஓ.டி. குவாண்டம் சர்க்யூட்).
The
qiskit.ignis.verification.randomized_benchmarking.CNOTDihedralnow contains the following new features. Initialization from various types of objects: CNOTDihedral, ScalarOp, QuantumCircuit, Instruction and Pauli. Converting to a matrix using to_matrix and to an operator using to_operator. Tensor product methods tensor and expand. Calculation of the adjoint, conjugate and transpose using conjugate, adjoint and transpose methods. Verify that an element is CNOTDihedral using is_cnotdihedral method. Decomposition method to_circuit of a CNOTDihedral element into a circuit was extended to allow any number of qubits, based on the function decompose_cnotdihedral_general.Adds expectation value measurement error mitigation to the mitigation module. This supports using complete N-qubit assignment matrix, single-qubit tensored assignment matrix, or continuous time Markov process (CTMP) [1] measurement error mitigation when computing expectation values of diagonal operators from counts dictionaries. Expectation values are computed using the using the
qiskit.ignis.mitigation.expectation_value()function.Calibration circuits for calibrating a measurement error mitigator are generated using the
qiskit.ignis.mitigation.expval_meas_mitigator_circuits()function, and the result fitted using theqiskit.ignis.mitigation.ExpvalMeasMitigatorFitterclass. The fitter returns a mitigator object can the be supplied as an argument to theexpectation_value()function to apply mitigation.- [1] S Bravyi, S Sheldon, A Kandala, DC McKay, JM Gambetta,
Mitigating measurement errors in multi-qubit experiments, arXiv:2006.14044 [quant-ph].
எடுத்துக்காட்டுகள்:
பின்வரும் உதாரணமாக 5-விகிதமான எதிர்பார்ப்பு மதிப்பு அளவிலான மதிப்பு அளவிலான ` ` 'tensored ' ` முறையை பயன்படுத்துகிறது.
from qiskit import execute from qiskit.test.mock import FakeVigo import qiskit.ignis.mitigation as mit backend = FakeVigo() num_qubits = backend.configuration().num_qubits # Generate calibration circuits circuits, metadata = mit.expval_meas_mitigator_circuits( num_qubits, method='tensored') result = execute(circuits, backend, shots=8192).result() # Fit mitigator mitigator = mit.ExpvalMeasMitigatorFitter(result, metadata).fit() # Plot fitted N-qubit assignment matrix mitigator.plot_assignment_matrix()
<matplotlib.axes._subplots.AxesSubplot at 0x7f48db517ac0>
பின்வரும் நிகழ்படங்கள் எப்படி மேற்பட்ட mitigator யை பயன்படுத்த எவ்வாறு கணக்கிடும் தவறான மதிப்பு கணக்கீடுகளுக்குத் தேவைப்படுகிறது
from qiskit import QuantumCircuit # Test Circuit with expectation value -1. qc = QuantumCircuit(num_qubits) qc.x(range(num_qubits)) qc.measure_all() # Execute shots = 8192 seed_simulator = 1999 result = execute(qc, backend, shots=8192, seed_simulator=1999).result() counts = result.get_counts(0) # Expectation value of Z^N without mitigation expval_nomit, error_nomit = mit.expectation_value(counts) print('Expval (no mitigation): {:.2f} \u00B1 {:.2f}'.format( expval_nomit, error_nomit)) # Expectation value of Z^N with mitigation expval_mit, error_mit = mit.expectation_value(counts, meas_mitigator=mitigator) print('Expval (with mitigation): {:.2f} \u00B1 {:.2f}'.format( expval_mit, error_mit))
Expval (no mitigation): -0.66 ± 0.01 Expval (with mitigation): -1.01 ± 0.01
நம்பாவை விருப்ப சார்புநிலையாக சேர்க்கிறது. வகுப்பு: qiskit.ignis.mitigation.CTMPExpvalMeasMitigator வகுப்பின் செயல்திறனை கணிசமாக அதிகரிக்க நம்பா CTMP முறையுடன் எதிர்பார்ப்பு மதிப்பு அளவீட்டு பிழை தணிப்புக்கு பயன்படுத்தப்படுகிறது.
இரண்டு முறைகளைச் சேர் :class:` qiskit.ignis.verification.quantum_volume.QVFitter `.
மெத்: சராசரி மற்றும் நிலையான விலகல் சிக்மாவைப் பயன்படுத்தி நிலையான இயல்பான விநியோகத்தில் z மதிப்பைக் கணக்கிட qiskit.ignis.verification.quantum_volume.QVFitter.calc_z_value. சிக்மா = 0 எனில், அது ஒரு எச்சரிக்கையை எழுப்புகிறது மற்றும் சிக்மாவுக்கு ஒரு சிறிய மதிப்பை (1e-10) ஒதுக்குகிறது, இதனால் குறியீடு இன்னும் இயங்கும்.
: மெத்: z மதிப்பைப் பயன்படுத்தி நம்பிக்கை அளவைக் கணக்கிட qiskit.ignis.verification.quantum_volume.QVFitter.calc_confidence_level.
Store confidence level even when hmean < 2/3 in
qiskit.ignis.verification.quantum_volume.QVFitter.qv_success().பைனோமியல் விநியோகத்தின் அடிப்படையில் புள்ளிவிவரங்களை எவ்வாறு கணக்கிடுவது என்பதற்கான விளக்கங்களைச் சேர்க்கவும்: மெத்: qiskit.ignis.verification.quantum_volume.QVFitter.calc_statistics.
வகுப்பு: qiskit.ignis.verification.QVFitter முறை: மெத்:` ~ qiskit.ignis.verification.QVFitter.plot_qv_data` ஒரு `` matplotlib.Figure`` பொருளைத் தர புதுப்பிக்கப்பட்டுள்ளது. முன்பு, அது எதையும் திருப்பித் தராது. ஒரு உருவத்தைத் திருப்புவதன் மூலம், காட்சிப்படுத்தல்களை ஒரு பெரிய `` மேட்லோட்லிப்`` பணிப்பாய்வுகளில் ஒருங்கிணைப்பதை இது எளிதாக்குகிறது.
: class: qiskit.ignis.verification.QVFitter முறை: மெத்:` qiskit.ignis.verification.QVFitter.plot_qv_data` ஆல் உருவாக்கப்பட்ட உருவத்தில் உள்ள பிழைகள் இரண்டு சிக்மா நம்பிக்கை இடைவெளிகளைக் குறிக்கும் வகையில் புதுப்பிக்கப்பட்டுள்ளன. முன்னதாக, பிழைகள் ஒரு-சிக்மா நம்பிக்கை இடைவெளிகளைக் குறிக்கும். குவாண்டம் தொகுதி தர நிர்ணயத்தின் வெற்றிகரமான அளவுகோல்களுக்கு கனமான வெளியீட்டு நிகழ்தகவு> 2/3 ஒரு பக்க இரு சிக்மா நம்பிக்கையுடன் (~ 97.7%) தேவைப்படுகிறது. இரண்டு சிக்மா நம்பிக்கை இடைவெளிகளைக் குறிக்க பிழைப் பட்டிகளை மாற்றுவது படத்தில் வெற்றியை எளிதில் அடையாளம் காண அனுமதிக்கிறது.
ஒரு புதிய குவார்க், `` figsize``: class: qiskit.ignis.verification.QVFitter method: meth:` qiskit.ignis.verification.QVFitter.plot_qv_data` இல் சேர்க்கப்பட்டுள்ளது. இந்த குவார்க் `` (x, y) `` வடிவத்தின் ஒரு பகுதியை எடுத்துக்கொள்கிறது, அங்கு `` x`` மற்றும் `` y`` ஆகியவை உருவாக்கப்பட்ட சதித்திட்டத்தை உருவாக்க அங்குலங்களில் பரிமாணமாகும்.
குவாண்டம் தொகுதி 64 காகிதத்தின் படம் 2a ஐப் போன்ற சோதனைகளின் எண்ணிக்கையை எதிர்த்து கனரக வெளியீட்டு நிகழ்தகவு (HOP) மற்றும் சோதனைகளின் எண்ணிக்கையைத் திட்டமிட: மெத்: qiskit.ignis.verification.quantum_volume.QVFitter.plot_hop_accumulative முறை சேர்க்கப்பட்டுள்ளது. //arxiv.org/abs/2008.08571>`_). தனிப்பட்ட சோதனைகளின் HOP சிதறல்கள் மற்றும் ஒட்டுமொத்த HOP சிவப்பு வரிசையில் திட்டமிடப்பட்டுள்ளதால் திட்டமிடப்பட்டுள்ளது. இரண்டு-சிக்மா நம்பிக்கை இடைவெளிகள் நிழலாடிய பகுதியாகவும் 2/3 வெற்றி வாசல் கோடு கோட்டாகவும் திட்டமிடப்பட்டுள்ளது
தனிப்பட்ட சோதனைகளைத் திட்டமிட, மெத்: qiskit.ignis.verification.quantum_volume.QVFitter.plot_qv_trial முறை சேர்க்கப்பட்டுள்ளது, கிஸ்கிட் டெர்ராவிலிருந்து: மெத்:` qiskit.visualization.plot_histogram` முறையை மேம்படுத்துகிறது. சிறந்த (வெற்று) மற்றும் சோதனை (நிரப்பப்பட்ட) மதிப்புகளுக்கான பிட்ஸ்ட்ரிங் எண்ணிக்கைகள் ஒன்றுடன் ஒன்று ஹிஸ்டோகிராம்களாக திட்டமிடப்பட்டுள்ளன. புராணத்தில் சோதனை கனமான வெளியீட்டு நிகழ்தகவு காட்டப்பட்டுள்ளது. சராசரி நிகழ்தகவு சிவப்பு கோடு கோட்டாக திட்டமிடப்பட்டுள்ளது.
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
Python 3.5 உடன் Qiskit டெர்ராவை இயக்குவதற்கான ஆதரவு நீக்கப்பட்டது. இந்த வெளியீட்டில் இருந்து Qiskit டெர்ராவைப் பயன்படுத்த நீங்கள் இப்போது குறைந்தபட்சம் Python 3.6 ஐப் பயன்படுத்த வேண்டும். நீங்கள் Python 3.5 ஐப் பயன்படுத்துகிறீர்கள் என்றால், வேலை செய்யும் கடைசி பதிப்பு Qiskit டெர்ரா 0.15.2 ஆகும்.
பிழை திருத்தங்கள்¶
வகுப்பில் ஒரு பிழையை சரிசெய்தல்: வர்க்கம்: 5 க்கும் மேற்பட்ட விலகல்களைக் கொண்ட உறுப்புகளுக்கு qiskit.ignis.verification.randomized_benchmarking.CNOTDihedral.
இதற்கான நம்பிக்கை நிலை வாசலை சரிசெய்யவும்: மெத்: qiskit.ignis.verification.quantum_volume.QVFitter.qv_success ஐ 0.977 க்கு z = 2 உடன் ஒத்த QV காகித அல்காரிதம் 1 ஆல் வரையறுக்கப்பட்டுள்ளது.
ஒரு பிழையைச் சரிசெய்யவும்: func: qiskit.ignis.verification.randomized_benchmarking.randomized_benchmarking_seq, கொடுக்கப்பட்ட rb_pattern இல் ஒரே அளவிலான அனைத்து துணை அமைப்புகளும் ஒரு 'rand_seed' அளவுரு செயல்பாட்டிற்கு வழங்கப்பட்டபோது ஒரே வாயில்களைக் கொண்டிருக்கின்றன.
Aqua 0. 8.0¶
முன்னுரை¶
இந்த விடுதலை போசிக் பிரச்சினைகளுக்கான கிடைக்கப்பெற்ற முறைகளை இயக்குவதற்கு ஒரு இடைமுகத்தை அறிமுகம் செய்கிறது. குறிப்பாக நாம் ஒரு முழு இடைமுகத்தை இயங்குவதற்கு ஒரு முழு இடைமுகத்தை அறிமுகப்படுத்தினோம்.
ஆரம்பிக்கப்பட்ட மாநிலங்களுக்கான ஒரு இடைமுகம் வேதியியல் கூறுகளுக்கு சேர்க்கப்பட்டுள்ளது. பொதுவான ஆயுதமான மாநிலங்களின் கணிப்பை உருவாக்குவதற்கு பயனருக்கு இப்போது எளிமையானதாகும். இந்த கணக்கெடுப்பு ` ` Driver ` ` இது மூலக்கூறுகளைப் பற்றிய ஒத்திசைவு தகவல்களை வழங்குகிறது, ` ` மாற்றம் ` ` பிரச்சினை பற்றிய தகவல்களை ஒரு விரைவான ஹாமிலோனியன் மற்றும் இறுதியாக ஒரு சோழர் பற்றிய தகவல்களை வழங்குகிறது. The Solver is the specific way which the उत्साहित states ගණනය is done (the algorithm). இந்த அமைப்பு தரமான மாநில கணக்கெடுப்பின் ஒன்றை பின்பற்றுகிறது. ஒரு ஒற்றை பதிலாக எதிர்பார்ப்பு மதிப்புகளின் பட்டியல்களை எடுப்பதற்கு முடிவுகள் மாற்றப்படுகின்றன. ` ` QEOM ` ` மற்றும் ` NumpyEigensolver ` ` புதிய கட்டமைப்புக்கு ஏற்றுக்கொள்ளப்படுகின்றன. ஒரு தொழிற்சாலையை ஒரு குறிப்பிட்ட வடிகட்டி (குறிப்பிட்ட சிம்மடிகளின் இலக்கு மாநிலங்கள்) கொண்டு ஒரு விண்மையான eigensolver இயக்குவதற்கு அறிமுகப்படுத்தப்படுகிறது.
Aer qasm_ simulator யுடன் VQE எதிர்பார்ப்பு கணக்கீடு இப்போது எதிர்பார்க்கப்பட்ட சுழல் நடத்தை கணக்கிடும்.
புதிய அம்சங்கள்¶
சூடான_ஸ்டார்ட் என்ற விருப்பத்தை அறிமுகப்படுத்தியது, பிற விருப்பங்களை சரிசெய்யும்போது பயன்படுத்தப்படாது. இந்த விருப்பம் இயக்கப்பட்டால், ஒரு தளர்வான சிக்கல் (அனைத்து மாறிகள் தொடர்ச்சியாக இருக்கும்) முதலில் தீர்க்கப்படும் மற்றும் தீர்வு தீர்வு முறையில் செயல்பாட்டு செயல்முறையைத் தொடங்குவதற்கு முன்பு தேர்வாளரின் நிலையைத் தொடங்க பயன்படுத்தப்படுகிறது.
வீச்சு மதிப்பீட்டு வழிமுறைகள் இப்போது A- மற்றும் Q ஆபரேட்டர்களைக் குறிப்பிட உள்ளீடுகளாக `` குவாண்டம் சிர்குட்`` பொருள்களைப் பயன்படுத்துகின்றன. இந்த மாற்றம் சுற்று நூலகத்தில் `` க்ரோவர் ஆபரேட்டர்`` அறிமுகப்படுத்தப்படுவதோடு செல்கிறது, இது வெவ்வேறு கியூ ஆபரேட்டர்களின் உள்ளுணர்வு மற்றும் விரைவான கட்டுமானத்தை அனுமதிக்கிறது. எடுத்துக்காட்டாக, ஒரு பெர்ன lli லி-பரிசோதனையை இப்போது கட்டமைக்க முடியும்
import numpy as np from qiskit import QuantumCircuit from qiskit.aqua.algorithms import AmplitudeEstimation probability = 0.5 angle = 2 * np.sqrt(np.arcsin(probability)) a_operator = QuantumCircuit(1) a_operator.ry(angle, 0) # construct directly q_operator = QuantumCircuit(1) q_operator.ry(2 * angle, 0) # construct via Grover operator from qiskit.circuit.library import GroverOperator oracle = QuantumCircuit(1) oracle.z(0) # good state = the qubit is in state |1> q_operator = GroverOperator(oracle, state_preparation=a_operator) # use default construction in QAE q_operator = None ae = AmplitudeEstimation(a_operator, q_operator)
நிபந்தனை (CVR) எதிர்பார்ப்பு மதிப்புகளின் கூட்டு மதிப்பை ஒழுங்கும்படி சேர்க்கவும்.
ஒரு உகப்பாக்கம் சிக்கலின் புறநிலை செயல்பாட்டுக்கு ஒத்த ஒரு மூலைவிட்ட அவதானிக்கக்கூடிய எச் கொடுக்கப்பட்டால், நாம் கவனித்த அளவீடுகளின் சராசரி ஆற்றலைக் குறைப்பதில் நாங்கள் பெரும்பாலும் ஆர்வம் காட்டவில்லை. இந்த சூழலில், எங்கள் அளவீடுகளில் சில குறைந்த ஆற்றலை அடைந்தால் நாங்கள் திருப்தி அடைகிறோம். (வேதியியல் சிக்கல்களுக்கு இது உறுதியாக இல்லை என்பதை நினைவில் கொள்க).
இந்த நோக்கத்திற்காக, மாறுபட்ட உகப்பாக்கத்தின் போது சிறந்த கவனிக்கப்பட்ட மாதிரியை செலவுச் செயல்பாடாகப் பயன்படுத்தலாம். இங்கே சிக்கல் என்னவென்றால், இது மென்மையான அல்லாத தேர்வுமுறை மேற்பரப்பில் ஏற்படக்கூடும். இந்த சிக்கலைத் தீர்க்க, சிறந்த கவனிக்கப்பட்ட மாதிரியை மட்டும் பயன்படுத்துவதன் மூலம் தேர்வுமுறை மேற்பரப்பை மென்மையாக்க முடியும், மாறாக சிறந்த கவனிக்கப்பட்ட மாதிரிகளில் சில பகுதிகளுக்கு மேல் சராசரியாக இருக்க முடியும். சி. வி. ஏ. ஆர் மதிப்பீட்டாளர் இதைச் சரியாகச் செய்கிறார் [1].
விடுங்கள்: கணிதம்: ஆல்பா இதில் ஒரு உண்மையான எண்ணாக இருக்க வேண்டும்: கணிதம்:` [0,1] இது புறநிலை செயல்பாட்டைக் கணக்கிடப் பயன்படும் சிறந்த கவனிக்கப்பட்ட மாதிரிகளின் பகுதியைக் குறிக்கிறது. கணிதம்: `ஆல்பா = 1, சி.வி.ஆர் ஒரு நிலையான எதிர்பார்ப்பு மதிப்புக்கு சமம் என்பதைக் கவனியுங்கள். இதேபோல், கணிதம்: ஆல்பா = 0 என்றால், சி.வி.ஆர் சிறந்த கவனிக்கப்பட்ட மாதிரியைப் பயன்படுத்துவதற்கு ஒத்திருக்கிறது. இதன் இடைநிலை மதிப்புகள்: கணிதம்: ஆல்பா இந்த இரண்டு புறநிலை செயல்பாடுகளுக்கு இடையில் ஒன்றிணைகிறது.
The functionality to use CVaR is included into the operator flow through a new subclass of OperatorStateFn called CVaRMeasurement. This new StateFn object is instantied in the same way as an OperatorMeasurement with the exception that it also accepts an alpha parameter and that it automatically enforces the is_measurement attribute to be True. Observe that it is unclear what a CVaRStateFn would represent were it not a measurement.
எடுத்துக்காட்டுகள்:
qc = QuantumCircuit(1) qc.h(0) op = CVaRMeasurement(Z, alpha=0.5) @ CircuitStateFn(primitive=qc, coeff=1.0) result = op.eval()
அதே போல, ஒரு இயல்பான எதிர்பார்ப்பு மதிப்புக்கு ஒத்திருக்கும் ஒரு இயக்குநர் CVaRExpectation மாற்றத்தை பயன்படுத்தி ஒரு CVR எதிர்பார்ப்பை மாற்றலாம்.
எடுத்துக்காட்டுகள்:
qc = QuantumCircuit(1) qc.h(0) op = ~StateFn(Z) @ CircuitStateFn(primitive=qc, coeff=1.0) cvar_expecation = CVaRExpectation(alpha=0.1).convert(op) result = cvar_expecation.eval()
இந்த நுட்பத்தைப் பற்றிய கூடுதல் விவரங்களுக்காக [1] பார்க்கவும்.
குறிப்பு:
- [1]: Barkoutsos, P. K., Nannicini, G., Robert, A., Tavernelli, I., and Woerner, S.,
"CVaR ஐப் பயன்படுத்தி மாறுபட்ட குவாண்டம் உகப்பாக்கலை மேம்படுத்துதல்" `arXiv: 1907.04769
புதிய இடைமுகம் ` ` Eigensolver ` ` for Eigensolver algorithms.
ஆரம்பிக்கப்பட்ட மாநிலங்களுக்கான ஒரு இடைமுகம் வேதியியல் கூறுகளுக்கு சேர்க்கப்பட்டுள்ளது. பொதுவான ஆயுதமான மாநிலங்களின் கணிப்பை உருவாக்குவதற்கு பயனருக்கு இப்போது எளிமையானதாகும். இந்த கணக்கெடுப்பு ` ` Driver ` ` இது மூலக்கூறுகளைப் பற்றிய ஒத்திசைவு தகவல்களை வழங்குகிறது, ` ` மாற்றம் ` ` பிரச்சினை பற்றிய தகவல்களை ஒரு விரைவான ஹாமிலோனியன் மற்றும் இறுதியாக ஒரு சோழர் பற்றிய தகவல்களை வழங்குகிறது. The Solver is the specific way which the उत्साहित states ගණනය is done (the algorithm). இந்த அமைப்பு தரமான மாநில கணக்கெடுப்பின் ஒன்றை பின்பற்றுகிறது. ஒரு ஒற்றை பதிலாக எதிர்பார்ப்பு மதிப்புகளின் பட்டியல்களை எடுப்பதற்கு முடிவுகள் மாற்றப்படுகின்றன. ` ` QEOM ` ` மற்றும் ` NumpyEigensolver ` ` புதிய கட்டமைப்புக்கு ஏற்றுக்கொள்ளப்படுகின்றன. ஒரு தொழிற்சாலையை ஒரு குறிப்பிட்ட வடிகட்டி (குறிப்பிட்ட சிம்மடிகளின் இலக்கு மாநிலங்கள்) கொண்டு ஒரு விண்மையான eigensolver இயக்குவதற்கு அறிமுகப்படுத்தப்படுகிறது.
ஃபெர்மோனிக் பிரச்சினைகளைத் தீர்மானிக்கும் பணிபுரிவதற்கு கூடுதலாக, போஸோனிக் கோட்பாடு மற்றும் ஆரம்பிக்கும் மாநிலங்கள் கணக்கிடுவதற்கு இடைமுகங்கள் சேர்க்கப்பட்டுள்ளன. குறிப்பாக நாம் ஒரு முழு இடைமுகத்தை இயங்குவதற்கு ஒரு முழு இடைமுகத்தை அறிமுகப்படுத்தினோம்.
The ` ` OrbitalOptimizationVQE ` ` has been added as new ground state solver in the chemistry module. This solver அனுமதிக்கிறது மாற்று அளபுருக்கள் மற்றும் மூலக்கூறுகளின் ஒழுங்குபடுத்தல். The algorithm is හඳුන්වා in Sokolov et al., The Journal of Chemical Physics 152 (12).
A new algorithm has been added: the Born Openheimer Potential Energy surface for the calculation of potential energy surface along different degrees of freedom of the molecule. The algorithm is called
BOPESSampler. It further provides functionalities of fitting the potential energy surface to an analytic function of predefined potentials.The
OrbitalOptimizationVQEhas been added as new ground state solver in the chemistry module. This solver allows for the simulatneous optimization of the variational parameters and the orbitals of the molecule. The algorithm is introduced in Sokolov et al., The Journal of Chemical Physics 152 (12).OrbitalOptimizationVQE`` வேதியியல் தொகுதியில் புதிய தரை நிலை தீர்வாக சேர்க்கப்பட்டுள்ளது. இந்த தீர்வி மாறுபட்ட அளவுருக்கள் மற்றும் மூலக்கூறின் சுற்றுப்பாதைகளின் உருவகப்படுத்துதலை மேம்படுத்த அனுமதிக்கிறது. இந்த வழிமுறை சோகோலோவ் மற்றும் பலர், வேதியியல் இயற்பியல் இதழ் 152 (12) இல் அறிமுகப்படுத்தப்பட்டுள்ளது.`.
சாய்வு கட்டமைப்பு. : class: qiskit.operators.gradients ஒரு குவாண்டம் நிலை ரெஸ்பைக் குறிக்கும் ஒரு ஆபரேட்டருக்கு வழங்கப்பட்டது. ஒரு எதிர்பார்ப்பு மதிப்பு, சாய்வு கட்டமைப்பானது சாய்வு, இயற்கை சாய்வு, ஹெஸ்ஸியன் மற்றும் குவாண்டம் ஃபிஷர் தகவல்களை மதிப்பீடு செய்ய உதவுகிறது
ஒரு அளவுருவாக்கப்பட்ட குவாண்டம் நிலை | ψ ()〉 = வி (ψ) | ψ input உள்ளீட்டு நிலை | ψ〉 மற்றும் அளவுருவாக்கப்பட்ட அன்சாட்ஸ் வி (θ), மற்றும் ஒரு ஆபரேட்டர் ஓ (ω).
சாய்வு: நாம் கணக்கிட விரும்புகிறோம்: கணிதம்: d⟨ψ (θ) | O (ω) | ψ (θ)〉 / dω resp. : கணிதம்: d⟨ψ (θ) | O (ω) | ψ ()〉 / dθ resp. : கணிதம்: d⟨ψ (θ) | i〉 | i | ψ ()〉 / dθ
The last case corresponds to the gradient w.r.t. the sampling probabilities of |ψ(θ). These gradients can be computed with different methods, i.e. a parameter shift, a linear combination of unitaries and a finite difference method.
எடுத்துக்காட்டுகள்:
x = Parameter('x') ham = x * X a = Parameter('a') q = QuantumRegister(1) qc = QuantumCircuit(q) qc.h(q) qc.p(params[0], q[0]) op = ~StateFn(ham) @ CircuitStateFn(primitive=qc, coeff=1.) value_dict = {x: 0.1, a: np.pi / 4} ham_grad = Gradient(grad_method='param_shift').convert(operator=op, params=[x]) ham_grad.assign_parameters(value_dict).eval() state_grad = Gradient(grad_method='lin_comb').convert(operator=op, params=[a]) state_grad.assign_parameters(value_dict).eval() prob_grad = Gradient(grad_method='fin_diff').convert(operator=CircuitStateFn(primitive=qc, coeff=1.), params=[a]) prob_grad.assign_parameters(value_dict).eval()
Hessians: We want to compute \(d^2⟨ψ(θ)|O(ω)|ψ(θ)〉/ dω^2\) resp. \(d^2⟨ψ(θ)|O(ω)|ψ(θ)〉/ dθ^2\) resp. \(d^2⟨ψ(θ)|O(ω)|ψ(θ)〉/ dθdω\) resp. \(d^2⟨ψ(θ)|i〉⟨i|ψ(θ)〉/ dθ^2\).
The last case corresponds to the Hessian w.r.t. the sampling probabilities of |ψ(θ). Just as the first order gradients, the Hessians can be evaluated with different methods, i.e. a parameter shift, a linear combination of unitaries and a finite difference method. Given a tuple of parameters
Hessian().convert(op, param_tuple)returns the value for the second order derivative. If a list of parameters is givenHessian().convert(op, param_list)returns the full Hessian for all the given parameters according to the given parameter order.QFI: The Quantum Fisher Information QFI is a metric tensor which is representative for the representation capacity of a parameterized quantum state |ψ(θ)〉 = V(θ)|ψ〉 generated by an input state |ψ〉 and a parametrized Ansatz V(θ). The entries of the QFI for a pure state read \([QFI]kl= Re[〈∂kψ|∂lψ〉−〈∂kψ|ψ〉〈ψ|∂lψ〉] * 4\).
Just as for the previous derivative types, the QFI can be computed using different methods: a full representation based on a linear combination of unitaries implementation, a block-diagonal and a diagonal representation based on an overlap method.
எடுத்துக்காட்டுகள்:
q = QuantumRegister(1) qc = QuantumCircuit(q) qc.h(q) qc.p(params[0], q[0]) op = ~StateFn(ham) @ CircuitStateFn(primitive=qc, coeff=1.) value_dict = {x: 0.1, a: np.pi / 4} qfi = QFI('lin_comb_full').convert(operator=CircuitStateFn(primitive=qc, coeff=1.), params=[a]) qfi.assign_parameters(value_dict).eval()
The combination of the QFI and the gradient lead to a special form of a gradient, namely
NaturalGradients: The natural gradient is a special gradient method which rescales a gradient w.r.t. a state parameter with the inverse of the corresponding Quantum Fisher Information (QFI) \(QFI^-1 d⟨ψ(θ)|O(ω)|ψ(θ)〉/ dθ\). Hereby, we can choose a gradient as well as a QFI method and a regularization method which is used together with a least square solver instead of exact invertion of the QFI:
எடுத்துக்காட்டுகள்:
op = ~StateFn(ham) @ CircuitStateFn(primitive=qc, coeff=1.) nat_grad = NaturalGradient(grad_method='lin_comb, qfi_method='lin_comb_full', \ regularization='ridge').convert(operator=op, params=params)
The gradient framework is also compatible with the optimizers from qiskit.aqua.components.optimizers. The derivative classes come with a gradient_wrapper() function which returns the corresponding callable.
Introduces
transformationsfor the fermionic and bosonic transformation of a problem instance. Transforms the fermionic operator to qubit operator. Respective class for the transformation isfermionic_transformationIntroduces in algorithmsground_state_solversfor the calculation of ground state properties. The calculation can be done either using anMinimumEigensolveror usingAdaptVQEIntroduceschemistry/resultswhere the eigenstate_result and the electronic_structure_result are also used for the algorithms. Introduces Minimum Eigensolver factoriesminimum_eigensolver_factorieswhere chemistry specific minimum eigensolvers can be initialized Introduces orbital optimization vqeoovqeas a ground state solver for chemistry applicationsNew Algorithm result classes:
Grovermethod_run()returns classGroverResult.AmplitudeEstimationmethod_run()returns classAmplitudeEstimationResult.IterativeAmplitudeEstimationmethod_run()returns classIterativeAmplitudeEstimationResult.MaximumLikelihoodAmplitudeEstimationmethod_run()returns classMaximumLikelihoodAmplitudeEstimationResult.All new result classes are backwards compatible with previous result dictionary.
New Linear Solver result classes:
HHLmethod_run()returns classHHLResult.NumPyLSsolvermethod_run()returns classNumPyLSsolverResult.All new result classes are backwards compatible with previous result dictionary.
MinimumEigenOptimizationResultnow exposes properties:samplesandeigensolver_result. The latter is obtained from the underlying algorithm used by the optimizer and specific to the algorithm.RecursiveMinimumEigenOptimizernow returns an instance of the result classRecursiveMinimumEigenOptimizationResultwhich in turn may contains intermediate results obtained from the underlying algorithms. The dedicated result class exposes propertiesreplacementsandhistorythat are specific to this optimizer. The depth of the history is managed by thehistoryparameter of the optimizer.`` க்ரோவர் ஆப்டிமைசர்`` இப்போது `` க்ரோவர் ஆப்டிமைசேஷன் ரிசல்ட்`` இன் ஒரு நிகழ்வைத் தருகிறது, மேலும் இந்த முடிவு வகுப்பு `` ஆபரேஷன்_கவுண்ட்ஸ்``, `` என்_இன்புட்_க்பிட்ஸ்``, மற்றும் `` என்_அவுட்_க்விட்ஸ்`` ஆகியவற்றை நேரடியாக வெளிப்படுத்துகிறது. இந்த பண்புகள் இனி `` raw_results`` அகராதியில் கிடைக்காது.
`` SlsqpOptimizer`` இப்போது `` SlsqpOptimizationResult`` இன் ஒரு உதாரணத்தைத் தருகிறது, மேலும் இந்த முடிவு வகுப்பு SLSQP செயல்படுத்தலுக்கான குறிப்பிட்ட கூடுதல் பண்புகளை அம்பலப்படுத்துகிறது.
Support passing
QuantumCircuitobjects as generator circuits into theQuantumGenerator.Removes the restriction to real input vectors in CircuitStateFn.from_vector. The method calls extensions.Initialize. The latter explicitly supports (in API and documentation) complex input vectors. So this restriction seems unnecessary.
Retworkx இன் வரைபட வண்ணமயமாக்கல் வழிமுறையைப் பயன்படுத்தி எளிமைப்படுத்தப்பட்ட AbelianGrouper. இது numpy அடிப்படையிலான வண்ணமயமாக்கல் வழிமுறையை விட வேகமானது.
Allow calling
evalon state function objects with no argument, which returns theVectorStateFnrepresentation of the state function. This is consistent behavior withOperatorBase.eval, which returns theMatrixOprepresentation, if no argument is passed.Adds
max_iterationsto theVQEAdaptclass in order to allow limiting the maximum number of iterations performed by the algorithm.VQE expectation computation with Aer qasm_simulator now defaults to a computation that has the expected shot noise behavior. The special Aer snapshot based computation, that is much faster, with the ideal output similar to state vector simulator, may still be chosen but like before Aqua 0.7 it now no longer defaults to this but can be chosen.
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
Extension of the previous Analytic Quantum Gradient Descent (AQGD) classical optimizer with the AQGD with Epochs. Now AQGD performs the gradient descent optimization with a momentum term, analytic gradients, and an added customized step length schedule for parametrized quantum gates. Gradients are computed "analytically" using the quantum circuit when evaluating the objective function.
The deprecated support for running qiskit-aqua with Python 3.5 has been removed. To use qiskit-aqua >=0.8.0 you will now need at least Python 3.6. If you are using Python 3.5 the last version which will work is qiskit-aqua 0.7.x.
Added retworkx as a new dependency.
தேய்மான குறிப்புகள்¶
வீச்சு மதிப்பீட்டு வழிமுறைகளின் `` i_objective`` வாதம் `` புறநிலை_க்பிட்கள்`` என மறுபெயரிடப்பட்டது.
உருமாற்ற வகை
குபிட் மேப்பிங் டைப்
Deprecate the
CircuitFactoryand derived types. TheCircuitFactoryhas been introduced as temporary class when theQuantumCircuitmissed some features necessary for applications in Aqua. Now that the circuit has all required functionality, the circuit factory can be removed. The replacements are shown in the following table.Circuit factory class | Replacement ------------------------------------+----------------------------------------------- CircuitFactory | use QuantumCircuit | UncertaintyModel | - UnivariateDistribution | - MultivariateDistribution | - NormalDistribution | qiskit.circuit.library.NormalDistribution MultivariateNormalDistribution | qiskit.circuit.library.NormalDistribution LogNormalDistribution | qiskit.circuit.library.LogNormalDistribution MultivariateLogNormalDistribution | qiskit.circuit.library.LogNormalDistribution UniformDistribution | qiskit.circuit.library.UniformDistribution MultivariateUniformDistribution | qiskit.circuit.library.UniformDistribution UnivariateVariationalDistribution | use parameterized QuantumCircuit MultivariateVariationalDistribution | use parameterized QuantumCircuit | UncertaintyProblem | - UnivariateProblem | - MultivariateProblem | - UnivariatePiecewiseLinearObjective | qiskit.circuit.library.LinearAmplitudeFunctionThe ising convert classes
qiskit.optimization.converters.QuadraticProgramToIsingandqiskit.optimization.converters.IsingToQuadraticProgramhave been deprecated and will be removed in a future release. Instead theqiskit.optimization.QuadraticProgrammethodsto_ising()andfrom_ising()should be used instead.Deprecate the
WeightedSumOperatorwhich has been ported to the circuit library asWeightedAdderinqiskit.circuit.library.Core Hamiltonianclass is deprecated in favor of theFermionicTransformationChemistry Operatorclass is deprecated in favor of thetranformationsminimum_eigen_solvers/vqe_adaptis also deprecated and moved as an implementation of the ground_state_solver interfaceapplications/molecular_ground_state_energyis deprecated in favor ofground_state_solver`` ஆப்டிமைசர். எடுத்துக்காட்டாக, `` Optimizer.SupportLevel.required`` க்கு பதிலாக `` OptimizerSupportLevel.required`` ஐப் பயன்படுத்தவும்.
QunatumGeneratorஉள்ளீடாக `` UnivariateVariationalDistribution`` மற்றும் `` MultivariateVariationalDistribution`` ஆகியவற்றைக் குறைக்கவும். அதற்கு பதிலாக, வெற்று ``QuantumCircuit `` பொருட்களைப் பயன்படுத்தலாம்.Ignored fast and use_nx options of AbelianGrouper.group_subops to be removed in the future release.
GSLS optimizer class deprecated
__init__parametermax_iterin favor ofmaxiter. SPSA optimizer class deprecated__init__parametermax_trialsin favor ofmaxiter. optimize_svm function deprecatedmax_itersparameter in favor ofmaxiter. ADMMParameters class deprecated__init__parametermax_iterin favor ofmaxiter.
பிழை திருத்தங்கள்¶
The UCCSD excitation list, comprising single and double excitations, was not being generated correctly when an active space was explicitly provided to UCSSD via the active_(un)occupied parameters.
For the amplitude estimation algorithms, we define the number of oracle queries as number of times the Q operator/Grover operator is applied. This includes the number of shots. That factor has been included in MLAE and IQAE but was missing in the 'standard' QAE.
Fix CircuitSampler.convert, so that the
is_measurementproperty is propagated to converted StateFns.Fix double calculation of coefficients in :meth`~qiskit.aqua.operators.VectorStateFn.to_circuit_op`.
Calling PauliTrotterEvolution.convert on an operator including a term that is a scalar multiple of the identity gave an incorrect circuit, one that ignored the scalar coefficient. This fix includes the effect of the coefficient in the global_phase property of the circuit.
Make ListOp.num_qubits check that all ops in list have the same num_qubits Previously, the number of qubits in the first operator in the ListOp was returned. With this change, an additional check is made that all other operators also have the same number of qubits.
Make PauliOp.exp_i() generate the correct matrix with the following changes. 1) There was previously an error in the phase of a factor of 2. 2) The global phase was ignored when converting the circuit to a matrix. We now use qiskit.quantum_info.Operator, which is generally useful for converting a circuit to a unitary matrix, when possible.
Fixes the cyclicity detection as reported buggy in https://github.com/Qiskit/qiskit-aqua/issues/1184.
IBM Q Provider 0.11.0¶
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
The deprecated support for running qiskit-ibmq-provider with Python 3.5 has been removed. To use qiskit-ibmq-provider >=0.11.0 you will now need at least Python 3.6. If you are using Python 3.5 the last version which will work is qiskit-ibmq-provider 0.10.x.
Prior to this release,
websockets7.0 was used for Python 3.6. With this release,websockets8.0 or above is required for all Python versions. The package requirements have been updated to reflect this.
Qiskit 0.22.0¶
டெரா 0.15.2¶
எந்த மாற்றங்களும் இல்லை
Aer 0.6.1¶
எந்த மாற்றங்களும் இல்லை
Ignis 0.4.0¶
எந்த மாற்றங்களும் இல்லை
அக்வா 0.7.5¶
எந்த மாற்றங்களும் இல்லை
ஐபிஎம் கியூ வழங்குபவர் 0.10.0¶
புதிய அம்சங்கள்¶
CQC randomness extractors can now be invoked asynchronously, using methods
run_async_ext1()andrun_async_ext2(). Each of these methods returns aCQCExtractorJobinstance that allows you to check on the job status (usingstatus()) and wait for its result (usingblock_until_ready()). Theqiskit.provider.ibmq.random.CQCExtractor.run()method remains synchronous.You can now use the new IBMQ experiment service to query, retrieve, and download experiment related data. Interface to this service is located in the new
qiskit.providers.ibmq.experimentpackage. Note that this feature is still in beta, and not all accounts have access to it. It is also subject to heavy modification in both functionality and API without backward compatibility.Two Jupyter magic functions, the IQX dashboard and the backend widget, are updated to display backend reservations. If a backend has reservations scheduled in the next 24 hours, time to the next one and its duration are displayed (e.g.
Reservation: in 6 hrs 30 min (60m)). If there is a reservation and the backend is active, the backend status is displayed asactive [R].
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
Starting from this release, the basis_gates returned by
qiskit.providers.ibmq.IBMQBackend.configuration()may differ for each backend. You should update your program if it relies on the basis gates being['id','u1','u2','u3','cx']. We recommend always using theconfiguration()method to find backend configuration values instead of hard coding them.qiskit-ibmq-providerrelease 0.10 requiresqiskit-terrarelease 0.15 or above. The package metadata has been updated to reflect the new dependency.
Qiskit 0.21.0¶
டெரா 0.15.2¶
எந்த மாற்றங்களும் இல்லை
Aer 0.6.1¶
எந்த மாற்றங்களும் இல்லை
Ignis 0.4.0¶
எந்த மாற்றங்களும் இல்லை
அக்வா 0.7.5¶
எந்த மாற்றங்களும் இல்லை
IBM Q Provider 0.9.0¶
புதிய அம்சங்கள்¶
You can now access the IBMQ random number services, such as the CQC randomness extractor, using the new package
qiskit.providers.ibmq.random. Note that this feature is still in beta, and not all accounts have access to it. It is also subject to heavy modification in both functionality and API without backward compatibility.
பிழை திருத்தங்கள்¶
Fixes an issue that may raise a
ValueErrorifretrieve_job()is used to retrieve a job submitted via the IBM Quantum Experience Composer.: class: ~ qiskit.providers.ibmq.managed.IBMQJobManager புதுப்பிக்கப்பட்டுள்ளது, இதனால் பழைய வேலை முடிவடையும் வரை காத்திருக்கும்போது நேரம் முடிந்தால், புதிய வேலை சமர்ப்பிக்கப்படுவதைத் தடுக்காது. திருத்தங்கள் `# 737
Qiskit 0.20.1¶
டெரா 0.15.2¶
பிழை திருத்தங்கள்¶
அளவுருவாக்கப்பட்ட `` கேட்`` உதாரணத்தின் `` வரையறை`` பண்புக்கூற்றை அணுகும்போது, உருவாக்கப்பட்ட `` குவாண்டம் சர்க்யூட்`` தவறான `` அளவுரு டேபிள்`` உடன் உருவாக்கப்பட்டது, அதாவது `` குவாண்டம் சிர்குட்.பாராமீட்டர்கள்`` `` QuantumCircuit.bind_parameters`` ஐ அழைப்பது வரம்பற்ற அளவுருக்களை தவறாக புகாரளிக்கும். இது தீர்க்கப்பட்டுள்ளது.
`` எஸ்.எக்ஸ் கேட் (). இது புதுப்பிக்கப்பட்டது `` எஸ்.எக்ஸ் கேட் (). தலைகீழ் () `` ஒரு `` எஸ்.எக்ஸ்.டி.ஜி கேட் () `` மற்றும் அதற்கு நேர்மாறாக.
`` Instruction.inverse ()
, துணைப்பிரிவால் மேலெழுதப்படாதபோது, சில சந்தர்ப்பங்களில் தவறான `` to_matrixமுறையுடன் `` கேட்`` உதாரணத்தைத் தரும். தவறான `` to_matrix`` முறைகளின் நிகழ்வுகள் நீக்கப்பட்டன.பூஜ்ஜியமற்ற `` கோணத்துடன்` `` சி 3 எக்ஸ் கேட்`` க்கு, `` சி 3 எக்ஸ் கேட்.இன்வர்ஸ் () `` வழியாக கேட்டை தலைகீழாக மாற்றுவது முன்பு தவறான தலைகீழ் வாயிலை உருவாக்கியது. இது சரி செய்யப்பட்டது.
.விளக்கு () `` என்று அழைக்கும் போது அதே பயன்முறையின் ஒரு வாயிலைத் திருப்புவதற்கு `` MCXGateமுறைகள் புதுப்பிக்கப்பட்டுள்ளன. சில சந்தர்ப்பங்களில், `` MCXVChain`` வாயிலின் தலைகீழ் கொண்ட ஒரு சுற்றுக்குச் செல்வது பிழையை எழுப்பும் ஒரு சிக்கலை இது தீர்க்கிறது.முன்னதாக, `` PhaseGate.control`` வழியாக பெருக்க கட்டுப்பாட்டு கட்ட வாயிலை உருவாக்கும் போது, `` MCU1Gate`` வாயில் திரும்பியது. இது சரி செய்யப்பட்டது, இதனால் `` MCPhaseGate`` திரும்பப் பெறப்படும்.
முன்னதாக, `` MCPhaseGate`` கொண்ட ஒரு சுற்றுவட்டத்தை சிதைக்க முயற்சிப்பது `` MCPhaseGate`` இன் வரையறையில் முரண்பாடு காரணமாக ஒரு பிழையை எழுப்புகிறது. இது சரி செய்யப்பட்டது.
`` QuantumCircuit.compose`` மற்றும் `` DAGCircuit.compose`` ஆகியவை சில சந்தர்ப்பங்களில், உள்ளீட்டு சுற்றுகளில் ஒன்றுக்கு மேற்பட்ட `` கிளாசிக்கல் ரெஜிஸ்டர்`` ஐக் கொண்டிருந்தால், நிபந்தனை வாயில்களை தவறாக மொழிபெயர்த்துள்ளன. இது தீர்க்கப்பட்டுள்ளது.
Fixed an issue when creating a
qiskit.result.Countsobject from an empty data dictionary. Now this will create an emptyCountsobject. Themost_frequent()method is also updated to raise a more descriptive exception when the object is empty. Fixes #5017மாறுபட்ட பதிவேடுகளுடன் சுற்றுகளை விரிவாக்குவது, `` கிரெக்ஸ்`` மற்றும் `` கிரெக்ஸ்`` பண்புகளை அதற்கேற்ப புதுப்பித்தது, ஆனால் `` க்விட்ஸ்`` மற்றும் `` கிளிபிட்ஸ்`` பட்டியல்கள் அல்ல. இவை இனி பதிவேடுகளிலிருந்து உருவாக்கப்படாது, ஆனால் அவை தற்காலிக சேமிப்பு பட்டியல்களாக இருப்பதால், இது பதிவேடுகள் மற்றும் பிட்களின் முரண்பாட்டிற்கு வழிவகுக்கிறது. இது சரி செய்யப்பட்டது மற்றும் `` நீட்டிப்பு` 'முறை தற்காலிக சேமிப்பு பிட் பட்டியல்களை வெளிப்படையாக புதுப்பிக்கிறது.
மெத்தின் உறுதியான செயலாக்கங்களின் பிழைகளை சரிசெய்யவும்: `` qiskit.circuit.ControlledGate.inverse` முறை, `` ctrl_state`` அளவுருவைப் பாதுகாக்காது.
ஒரு பிழை ஏற்பட்டது என்று நீண்ட சாளர திட்டத்தை ஏற்படுத்தும் போது ஒரு சுழல் பிழை ஏற்பட்டது.
Aer 0.6.1¶
எந்த மாற்றங்களும் இல்லை
Ignis 0.4.0¶
எந்த மாற்றங்களும் இல்லை
அக்வா 0.7.5¶
எந்த மாற்றங்களும் இல்லை
IBM Q வழங்கி 0. 8. 0¶
எந்த மாற்றங்களும் இல்லை
Qiskit 0.20.0¶
Terra 0.15.1¶
முன்னுரை¶
0.16.0 வெளியீட்டில் பல புதிய அம்சங்கள் மற்றும் பிழை திருத்தங்கள் ஆகியவை அடங்கும். இந்த வெளியீட்டில் வரும் அம்சங்கள் பின்வருமாறு:
இந்த விடுதலை சார்ந்த அடிப்படையிலான மொழிபெயர்ப்பு அறிமுகம் (transpiler) உள்ளடக்கத்தை உள்ளடக்குகிறது. இது நேரடியாக ஒரு பரவலான கருவி அடிப்படையிலான சாதனை அடிப்படையிலான ஆதரவு, எ. கா, RZ, RZ, CZ, CZ அல்லது iSwap வாயில்களை செயல்படுத்துகிறது.
The :class:` ~ qiskit.circuit.QuantumCircuit ` class now tracks global phase. அதாவது உலகளாவிய காலம் தற்போது சரியாக கூடுதலாக ஒரு சுற்றுச்சூழல் நிலையை கட்டுப்படுத்துகிறது, மற்றும் வாய்க்கு மாட்ரிக்ஸ் வரையறைகள் ஒரு உலகளாவிய நிலைக்கு சமமாக கூடுதலாகும்.
புதிய அம்சங்கள்¶
ஒரு புதிய DAG வகுப்பு: வர்க்கம்: சுற்றுகளின் சார்பு வடிவத்தைக் குறிக்க qiskit.dagcircuit.DAGDependency, இந்த DAG இல், முனைகள் செயல்பாடுகள் (வாயில்கள், அளவீட்டு, தடை போன்றவை ...) மற்றும் விளிம்புகள் பரிமாற்றம் அல்லாதவற்றுடன் ஒத்திருக்கும் இரண்டு செயல்பாடுகளுக்கு இடையில்.
நான்கு புதிய செயல்பாடுகள் இதில் சேர்க்கப்பட்டுள்ளன: mod: qiskit.converters முன்னும் பின்னுமாக மாற்றுவதற்கு: வகுப்பு:` ~ qiskit.dagcircuit.DAGDependency`. இந்த செயல்பாடுகள்:
func: ~ qiskit.converters.circuit_to_dagdependency ஒரு: வகுப்பிலிருந்து மாற்ற:` ~ qiskit.circuit.QuantumCircuit` பொருள் ஒரு: வகுப்பிற்கு: ~ qiskit.dagcircuit.DAGDependency பொருள்.
: func: ~ qiskit.converters.dagdependency_to_circuit இலிருந்து ஒரு: வகுப்பிலிருந்து மாற்ற:` ~ qiskit.dagcircuit.DAGDependency` பொருள் ஒரு: வகுப்பிற்கு: q qiskit.circuit.QuantumCircuit பொருள.
: func: ~ qiskit.converters.dag_to_dagdependency ஒரு: வகுப்பிலிருந்து மாற்ற:` ~ qiskit.dagcircuit.DAGCircuit` பொருள் ஒரு: வகுப்பிற்கு: ~ qiskit.dagcircuit.DAGDependency பொருள்.
: func: ~ qiskit.converters.dagdependency_to_circuit இலிருந்து ஒரு: வகுப்பிலிருந்து மாற்ற:` ~ qiskit.dagcircuit.DAGDependency` பொருள் ஒரு: வகுப்பிற்கு: q qiskit.circuit.QuantumCircuit பொருள.
உதாரணத்திற்கு:
from qiskit.converters.dagdependency_to_circuit import dagdependency_to_circuit from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit circuit_in = QuantumCircuit(2) circuit_in.h(qr[0]) circuit_in.h(qr[1]) dag_dependency = circuit_to_dagdependency(circuit_in) circuit_out = dagdepency_to_circuit(dag_dependency)
இரண்டு புதிய டிரான்ஸ்பைலர் பாஸ்கள் இதில் சேர்க்கப்பட்டுள்ளன: mod: qiskit.transpiler.passes முதல் ,: வகுப்பு:` ~ qiskit.transpiler.passes.UnrollCustomDefinitions`, அவற்றின் படி அனைத்து வழிமுறைகளையும் அவிழ்த்து விடுகிறது: attr: q qiskit .circuit.Instruction.definition சொத்து, குறிப்பிட்ட `` அடிப்படை_கட்டுகள்`` அல்லது வழங்கப்பட்ட வாயில்களின் தொகுப்பை அடையும் போது நிறுத்தப்படும்: வகுப்பு: ~ qiskit.circuit.EquivlanceLibrary. இரண்டாவது ,: வகுப்பு: ~ qiskit.transpiler.passes.BasisTranslator, வழங்கப்பட்ட மொழிபெயர்ப்புகளின் தொகுப்பைப் பயன்படுத்துகிறது: வகுப்பு:` ~ qiskit.circuit.EquivalentLibrary` ஒரு குறிப்பிட்ட அடிப்படையில் சுற்று வழிமுறைகளை மீண்டும் எழுத.
கிடைக்கக்கூடிய சாதன வாயில்களுக்கு சுற்றுகளை மொழிபெயர்க்க பயன்படும் முறையைத் தேர்ந்தெடுப்பதை அனுமதிக்க ஒரு புதிய `` மொழிபெயர்ப்பு_மாதல்`` முக்கிய சொல் சேர்க்கப்பட்டுள்ளது: func: ~ qiskit.compiler.transpile. எடுத்துக்காட்டாக, `` டிரான்ஸ்பைல் (சுற்றறிக்கை, பின்தளத்தில், மொழிபெயர்ப்பு_மெதட் = 'மொழிபெயர்ப்பாளர்') ``. செல்லுபடியாகும் தேர்வுகள்:
`` 'unroller'``: வகுப்பைப் பயன்படுத்த: ~ qiskit.transpiler.passes.Unroller
`` 'மொழிபெயர்ப்பாளர்'``: வகுப்பைப் பயன்படுத்த: ~ qiskit.transpiler.passes.BasisTranslator.
`` 'தொகுப்பு'``: வகுப்பைப் பயன்படுத்த: ~ qiskit.transpiler.passes.UnitarySynthesis pass.
முன்னிருப்பு மதிப்பு ` மொழிபெயர்ப்பு ` ` `.
முடிவு முடிவு தரவைக் கையாள்வதற்கான புதிய வகுப்பு ,: வகுப்பு: qiskit.result.Counts, சேர்க்கப்பட்டுள்ளது. இந்த வகுப்பு `` டிக்ட்`` இன் துணைப்பிரிவாகும், மேலும் இது வேறு எந்த அகராதியையும் போல தொடர்பு கொள்ளலாம். ஆனால், இது சோதனைகளின் எண்ணிக்கையின் முடிவுகளைக் கையாள்வதற்கான உதவி முறைகள் மற்றும் பண்புகளை உள்ளடக்கியது மற்றும் பொருள் துவக்கத்தில் பைனரி சரங்களின் பிந்தைய செயலாக்கம் மற்றும் வடிவமைப்பையும் கையாளுகிறது. A: class: ~ qiskit.result.Counts பொருளை விசைகள் முழு எண்ணாகக் கொண்டு,` 0x4a' வடிவத்தின் அறுகோண சரங்களை,` 'வடிவத்தின் பைனரி சரங்களைக் கொண்டு எண்ணிக்கையின் அகராதியைக் கடந்து செல்வதன் மூலம் உருவாக்க முடியும். 0b1101'`, பதிவு மற்றும் நினைவக இடங்கள் (அதாவது `` '00 10'``) அல்லது ஒரு டிட் சரம் முழுவதும் வடிவமைக்கப்பட்ட ஒரு பிட் சரம். உதாரணத்திற்கு:
from qiskit.result import Counts counts = Counts({"0x0': 1, '0x1', 3, '0x2': 1020})
:class:` qiskit.dagcircuit.DAGCircuit ` பொருட்களை சேர்க்கும், :meth:` ~ qiskit.dagcircuit.DAGCircuit.from_networkx . This method takes in a networkx ` ` MultiDiGraph ` ` object (in the format of :meth: ~ qiskit.dagcircuit.dAGCircuit.to_networkx ) and will return a new :class: ~ qiskit.dagcircuit.DAGCircuit ` object. இந்த செயல்கூறு பின்னால் இந்த செயல்கூறு இயங்கும் ஆசிரியர்கள் வலைப்பதிவொன்றின் ` ग्राफ படிமம் நூலகம் <https://networkx.github.io/documentation/stable/reference/algorithms/index.html>` _ என்றால், ` retworkx API <https://retworkx.readthedocs.io/en/latest/api.html>` _. என்றாலும், அதாவது, இப்படி ஒரு பிரச்சனை ` retworkx issue tracker <https://github.com/Qiskit/retworkx/issues>` __ (or even the better a pull request बुझाएको).
`` Init_qubits`` க்கான புதிய குவார்க் இதில் சேர்க்கப்பட்டுள்ளது: func: ~ qiskit.compiler.assemble மற்றும்: func:` ~ qiskit.execute.execute`. இந்த அம்சத்தை ஆதரிக்கும் பின்தளத்தில், `` init_qubits`` சுற்றுகளை இயக்கும் பின்தளத்தில் ஒவ்வொரு ஷாட்டின் தொடக்கத்திலும் ஏதேனும் துவக்க வரிசைகளை செருகுமா என்பதைக் கட்டுப்படுத்த பயன்படுத்தலாம். முன்னிருப்பாக இது `` உண்மை`` என அமைக்கப்பட்டுள்ளது, அதாவது ஒவ்வொரு ஷாட்டின் தொடக்கத்திலும் அனைத்து குவிட்களும் தரை நிலையில் இருப்பதாக கருதலாம். இருப்பினும், `` init_qubits`` `` தவறு`` என அமைக்கப்பட்டால், ஒவ்வொரு பரிசோதனையின் தொடக்கத்திலும் காட்சிகளுக்கிடையில் துவக்கங்கள் தொடங்கப்படாது. குறிப்பு, சுற்றுகளை இயக்கும் பின்தளத்தில் இந்த கொடி எந்த விளைவையும் ஏற்படுத்த இந்த அம்சத்தை ஆதரிக்க வேண்டும்.
ஒரு புதிய குவார்க் `` rep_delay`` இல் சேர்க்கப்பட்டுள்ளது: func: qiskit.compiler.assemble ,: func:` qiskit.execute.execute`, மற்றும் கட்டமைப்பாளர்: class: ~ qiskit.qobj.PulseQobjtConfig. qiskit நிரல் செயலாக்கங்களுக்கு இடையிலான நேரத்தைக் குறிக்க இந்த புதிய குவார்க் பயன்படுத்தப்படுகிறது. இது ஒரு பின்தளத்தில் இருந்து `` rep_delays`` என அமைக்கப்பட்ட செல்லுபடியாகும் மதிப்புகளின் பட்டியலிலிருந்து தேர்ந்தெடுக்கப்பட வேண்டும்: வகுப்பு: ~ qiskit.providers.models.PulseBackendConfiguration பொருள்` backend.configuration (). Rep_delays என அணுகலாம். `).
`` Rep_delay`` kwarg பின்தளத்தில் மட்டுமே செயல்படும், இது மாறும் மறுபடியும் நேரத்தை அனுமதிக்கும். இது: வர்க்கத்திலும் குறிக்கப்படும்: ~ qiskit.providers.models.PulseBackendConfiguration ஒரு பின்தளத்தில்` டைனமிக்_ரெபிரேட்_எனபிள்` பண்புக்கூறு. `` டைனமிக்_ரெபரேட்_எனபிள்`` என்பது `` தவறு`` எனில், `` rep_time`` மதிப்பு: func: qiskit.compiler.assemble ,: func:` qiskit.execute.execute`, அல்லது கட்டமைப்பாளருக்கான: : `` q_kit.qobj.PulseQobjtConfig` என்பது `` rep_delay`` ஐ விடப் பயன்படுத்தப்படும். `` rep_time`` நிரல்களுக்கு இடையிலான தாமதத்தை விட, ஒரு நிரலின் காலத்தைக் குறிப்பிட பயனர்களை மட்டுமே அனுமதிக்கிறது.
`` qobj_schema.json`` இன் JSON ஸ்கீமா கோப்பு: mod: qiskit.schemas QASM Qobj களுக்கான விருப்ப உள்ளமைவு சொத்தாக` rep_delay` ஐ சேர்க்க புதுப்பிக்கப்பட்டுள்ளது.
`` பின்தளத்தில்_அமைவு_ஸ்கீமா.ஜ்சன்`` இந்த ஜ்சன் திட்ட கோப்பு: mod: qiskit.schemas ஒரு QASM பின்தளத்தில் உள்ளமைவுக்கான விருப்ப பண்புகளாக` டைனமிக்_ரெபரேட்_எனபிள்`,` ரெப்_டேலே_ரேஞ்ச்` மற்றும்` இயல்புநிலை_ரெப்_டேலே` ஆகியவற்றைச் சேர்க்க புதுப்பிக்கப்பட்டுள்ளது. பேலோட்.
A new attribute,
global_phase, which is is used for tracking the global phase has been added to theqiskit.circuit.QuantumCircuitclass. For example:import math from qiskit import QuantumCircuit circ = QuantumCircuit(1, global_phase=math.pi) circ.u1(0)
The global phase may also be changed or queried with
circ.global_phasein the above example. In either case the setting is in radians. If the circuit is converted to an instruction or gate the global phase is represented by two single qubit rotations on the first qubit.This allows for other methods and functions which consume a
QuantumCircuitobject to take global phase into account. For example. with theglobal_phaseattribute theto_matrix()method for a gate can now exactly correspond to its decompositions instead of just up to a global phase.The same attribute has also been added to the
DAGCircuitclass so that global phase can be tracked when converting betweenQuantumCircuitandDAGCircuit.Two new classes,
AncillaRegisterandAncillaQubithave been added to theqiskit.circuitmodule. These are subclasses ofQuantumRegisterandQubitrespectively and enable marking qubits being ancillas. This will allow these qubits to be re-used in larger circuits and algorithms.A new method,
control(), has been added to theQuantumCircuit. This method will return a controlled version of theQuantumCircuitobject, with both open and closed controls. This functionality had previously only been accessible via theGateclass.A new method
repeat()has been added to theQuantumCircuitclass. It returns a new circuit object containing a specified number of repetitions of the original circuit. For example:from qiskit.circuit import QuantumCircuit qc = QuantumCircuit(2) qc.h(0) qc.cx(0, 1) repeated_qc = qc.repeat(3) repeated_qc.decompose().draw(output='mpl')
The parameters are copied by reference, meaning that if you update the parameters in one instance of the circuit all repetitions will be updated.
A new method
reverse_bits()has been added to theQuantumCircuitclass. This method will reverse the order of bits in a circuit (both quantum and classical bits). This can be used to switch a circuit from little-endian to big-endian and vice-versa.A new method,
combine_into_edge_map(), was added to theqiskit.transpiler.Layoutclass. This method enables converting converting twoLayoutobjects into a qubit map for composing two circuits.A new class,
ConfigurableFakeBackend, has been added to theqiskit.test.mock.utilsmodule. This new class enables the creation of configurable mock backends for use in testing. For example:from qiskit.test.mock.utils import ConfigurableFakeBackend backend = ConfigurableFakeBackend("Tashkent", n_qubits=100, version="0.0.1", basis_gates=['u1'], qubit_t1=99., qubit_t2=146., qubit_frequency=5., qubit_readout_error=0.01, single_qubit_gates=['u1'])
will create a backend object with 100 qubits and all the other parameters specified in the constructor.
A new method
draw()has been added to theqiskit.circuit.EquivalenceLibraryclass. This method can be used for drawing the contents of an equivalence library, which can be useful for debugging. For example:from numpy import pi from qiskit.circuit import EquivalenceLibrary from qiskit.circuit import QuantumCircuit from qiskit.circuit import QuantumRegister from qiskit.circuit import Parameter from qiskit.circuit.library import HGate from qiskit.circuit.library import U2Gate from qiskit.circuit.library import U3Gate my_equiv_library = EquivalenceLibrary() q = QuantumRegister(1, 'q') def_h = QuantumCircuit(q) def_h.append(U2Gate(0, pi), [q[0]], []) my_equiv_library.add_equivalence(HGate(), def_h) theta = Parameter('theta') phi = Parameter('phi') lam = Parameter('lam') def_u2 = QuantumCircuit(q) def_u2.append(U3Gate(pi / 2, phi, lam), [q[0]], []) my_equiv_library.add_equivalence(U2Gate(phi, lam), def_u2) my_equiv_library.draw()
A new Phase instruction,
SetPhase, has been added toqiskit.pulse. This instruction sets the phase of the subsequent pulses to the specified phase (in radians. For example:import numpy as np from qiskit.pulse import DriveChannel from qiskit.pulse import Schedule from qiskit.pulse import SetPhase sched = Schedule() sched += SetPhase(np.pi, DriveChannel(0))
In this example, the phase of the pulses applied to
DriveChannel(0)after theSetPhaseinstruction will be set to \(\pi\) radians.A new pulse instruction
ShiftFrequencyhas been added toqiskit.pulse.instructions. This instruction enables shifting the frequency of a channel from its set frequency. For example:from qiskit.pulse import DriveChannel from qiskit.pulse import Schedule from qiskit.pulse import ShiftFrequency sched = Schedule() sched += ShiftFrequency(-340e6, DriveChannel(0))
In this example all the pulses applied to
DriveChannel(0)after theShiftFrequencycommand will have the envelope a frequency decremented by 340MHz.A new method
conjugate()has been added to theParameterExpressionclass. This enables callingnumpy.conj()without raising an error. Since aParameterExpressionobject is real, it will return itself. This behaviour is analogous to Python floats/ints.A new class
PhaseEstimationhas been added toqiskit.circuit.library. This circuit library class is the circuit used in the original formulation of the phase estimation algorithm in arXiv:quant-ph/9511026. Phase estimation is the task to to estimate the phase \(\phi\) of an eigenvalue \(e^{2\pi i\phi}\) of a unitary operator \(U\), provided with the corresponding eigenstate \(|psi\rangle\). That is\[U|\psi\rangle = e^{2\pi i\phi} |\psi\rangle\]This estimation (and thereby this circuit) is a central routine to several well-known algorithms, such as Shor's algorithm or Quantum Amplitude Estimation.
The
qiskit.visualizationfunctionplot_state_qsphere()has a new kwargshow_state_labelswhich is used to control whether each blob in the qsphere visualization is labeled. By default this kwarg is set toTrueand shows the basis states next to each blob by default. This feature can be disabled, reverting to the previous behavior, by setting theshow_state_labelskwarg toFalse.The
qiskit.visualizationfunctionplot_state_qsphere()has a new kwargshow_state_phaseswhich is set toFalseby default. When set toTrueit displays the phase of each basis state.The
qiskit.visualizationfunctionplot_state_qsphere()has a new kwarguse_degreeswhich is set toFalseby default. When set toTrueit displays the phase of each basis state in degrees, along with the phase circle at the bottom right.A new class,
QuadraticFormto theqiskit.circuit.librarymodule for implementing a a quadratic form on binary variables. The circuit library element implements the operation\[|x\rangle |0\rangle \mapsto |x\rangle |Q(x) \mod 2^m\rangle\]for the quadratic form \(Q\) and \(m\) output qubits. The result is in the \(m\) output qubits is encoded in two's complement. If \(m\) is not specified, the circuit will choose the minimal number of qubits required to represent the result without applying a modulo operation. The quadratic form is specified using a matrix for the quadratic terms, a vector for the linear terms and a constant offset. If all terms are integers, the circuit implements the quadratic form exactly, otherwise it is only an approximation.
உதாரணத்திற்கு:
import numpy as np from qiskit.circuit.library import QuadraticForm A = np.array([[1, 2], [-1, 0]]) b = np.array([3, -3]) c = -2 m = 4 quad_form_circuit = QuadraticForm(m, A, b, c)
Add
qiskit.quantum_info.Statevector.expectation_value()andqiskit.quantum_info.DensityMatrix.expectation_value()methods for computing the expectation value of anqiskit.quantum_info.Operator.For the
seedkwarg in the constructor forqiskit.circuit.library.QuantumVolumenumpy random Generator objects can now be used. Previously, only integers were a valid input. This is useful when integratingQuantumVolumeas part of a larger function with its own random number generation, e.g. generating a sequence ofQuantumVolumecircuits.வகுப்பு: ~ qiskit.circuit.QuantumCircuit முறை: மெத்:` ~ qiskit.circuit.QuantumCircuit.compose` ஒரு புதிய குவார்க் `` முன்`` ஐக் கொண்டுள்ளது, இது பிற சுற்றுக்கு பதிலாக பிற சுற்றுக்கு முன்னதாக தயாரிக்க பயன்படுகிறது சேர்க்கிறது. உதாரணத்திற்கு:
from qiskit.circuit import QuantumCircuit circ1 = QuantumCircuit(2) circ2 = QuantumCircuit(2) circ2.h(0) circ1.cx(0, 1) circ1.compose(circ2, front=True).draw(output='mpl')
Two new passes,
SabreLayoutandSabreSwapfor layout and routing have been added toqiskit.transpiler.passes. These new passes are based on the algorithm presented in Li et al., "Tackling the Qubit Mapping Problem for NISQ-Era Quantum Devices", ASPLOS 2019. They can also be selected when using thetranspile()function by setting thelayout_methodkwarg to'sabre'and/or therouting_methodto'sabre'to useSabreLayoutandSabreSwaprespectively.Added the method
replace()to theqiskit.pulse.Scheduleclass which allows a pulse instruction to be replaced with another. For example:.. code-block:: python
qiskit இறக்குமதி துடிப்பு இருந்து
d0 = pulse.DriveChannel (0)
sched = pulse.Schedule ()
old = pulse.Play (pulse.Constant (100, 1. 0), d0) new = pulse.Play (pulse.Constant (100, 0.1), d0)
sched + = old
sched = sched.replace (old, new)
assert sched == pulse.Schedule(new)
புதிய கேட் வகுப்புகளை இவற்றுக்குச் சேர்த்தது:mod: qiskit.circuit.library க்கு :math:` sqrt {X}`, அதன் சரிசெய்தல்:math: sqrt {X} ^ ag dagger, மற்றும் கட்டுப்படுத்தப்பட்ட:math:` sqrt {X} வாயில்கள்:class: ~ qiskit.circuit.library.SXGate` ,:class: ~ qiskit.circuit.library.SXdgGate, மற்றும் :class:` ~ qiskit.circuit.library.CSXGate` . அவற்றை:class: ~ qiskit.circuit.QuantumCircuit பொருளைப் பயன்படுத்தி:meth:` ~ qiskit.circuit.QuantumCircuit.sx` ,:meth: ~ qiskit.circuit.QuantumCircuit.sxdg, மற்றும் :meth: ~ qiskit.circuit.QuantumCircuit.csx முறையே.
:class:` ~ qiskit.circuit.Reset ` வழிமுறையை :meth:` qiskit.quiskit.quantum_info.Statevector.from_instruction` க்கு ஆதரவு சேர்க்கவும். குறிப்பு குவிட் ஒரு சூப்பர் போசிஷன் நிலையில் இருக்கும் விஷயத்தில் பூஜ்ஜிய நிலைக்குத் திட்டத்தைத் தேர்ந்தெடுப்பதில் ஆர்.என்.ஜி மாதிரியை இது உள்ளடக்குகிறது என்பதை நினைவில் கொள்க. சாம்ப்டிங் க்கு விதி :meth:` ~ qiskit.quantum_info.Statevector.seed ` முறையைப் பயன்படுத்தி அமைக்கலாம்.
முறைகள் :meth:` qiskit.circuit.ParameterExpression.subs ` and :meth:` qiskit.circuit.QuantumCircuit.Quiskit.QuantumCircuit.pres_parameters ` இப்போது :class:` ~ qiskit.circuit.ParameterExpression ` இலக்கு மதிப்பு மாற்றாக.
உதாரணமாக
from qiskit.circuit import QuantumCircuit, Parameter p = Parameter('p') source = QuantumCircuit(1) source.rz(p, 0) x = Parameter('x') source.assign_parameters({p: x*x})
┌──────────┐ q_0: ┤ Rz(x**2) ├ └──────────┘தி:meth: ~ qiskit.circuit.QuantumCircuit முறை:meth:` ~ qiskit.circuit.QuantumCircuit.to_gate` இல் ஒரு புதிய குவார்க் உள்ளது `` label`` இது வெளியீட்டிற்கான லேபிளை அமைக்கப் பயன்படுகிறது:class: ~ qiskit.circuit.Gate பொருள். உதாரணத்திற்கு:
from qiskit.circuit import QuantumCircuit circuit_gate = QuantumCircuit(2) circuit_gate.h(0) circuit_gate.cx(0, 1) custom_gate = circuit_gate.to_gate(label='My Special Bell') new_circ = QuantumCircuit(2) new_circ.append(custom_gate, [0, 1], []) new_circ.draw(output='mpl')
சேர்க்கப்பட்டது: வகுப்பு: ~ qiskit.circuit.library.UGate ,: வகுப்பு:` ~ qiskit.circuit.library.CUGate` ,: வகுப்பு: ~ qiskit.circuit.library.PhaseGate, மற்றும்: வகுப்பு:` ~ qiskit.circuit.library.CPhaseGate` உடன் தொடர்புடையது: வகுப்பு: ~ qiskit.circuit.QuantumCircuit முறைகள்: மெத்:` ~ qiskit.circuit.QuantumCircuit.u` ,: மெத்: ~ qiskit.circuit.QuantumCircuit.cucu ,: மெத்: ~ qiskit.circuit.QuantumCircuit.p, மற்றும்: மெத்:` ~ qiskit.circuit.QuantumCircuit.cp`. வகுப்பு: ~ qiskit.circuit.library.UGate கேட் என்பது 3 யூலர் கோணங்களைக் கொண்ட பொதுவான ஒற்றை குவிட் சுழற்சி வாயில் மற்றும்: வர்க்கம்:` ~ qiskit.circuit.library.CUGate` கேட் அதன் கட்டுப்படுத்தப்பட்ட பதிப்பு. : வகுப்பு: ~ qiskit.circuit.library.CUGate க்கு U வாயிலின் சாத்தியமான உலகளாவிய கட்டத்தைக் கணக்கிட 4 அளவுருக்கள் உள்ளன. வகுப்பு: ~ qiskit.circuit.library.PhaseGate மற்றும்: வகுப்பு:` ~ qiskit.circuit.library.CPhaseGate` வாயில்கள் ஒரு தன்னிச்சையான கோணத்தில் பொதுவான கட்ட வாயில் மற்றும் அது கட்டுப்படுத்தப்பட்ட பதிப்பு.
ஒரு புதிய குவார்க், `` க்ரெக்பண்டில்``:func: qiskit.visualization.circuit_drawer செயல்பாடு மற்றும் :class:` ~ qiskit.circuit.QuantumCircuit` முறை:meth: q qiskit.circuit.QuantumCircuit இல் சேர்க்கப்பட்டுள்ளது. வரைய. `` உண்மை`` என அமைக்கப்பட்டால், `` உரை`` மற்றும் `` எம்.பி.எல்`` இழுப்பறைகளுக்கான சுற்று காட்சிப்படுத்தல்களில் கிரெக்ஸ் ஒரு வரியில் தொகுக்கப்படும். இயல்புநிலை மதிப்பு `` உண்மை``. முகவரிகள் வெளியீடு # 4290 <https://github.com/Qiskit/qiskit-terra/issues/4290> _.
உதாரணத்திற்கு:
from qiskit import QuantumCircuit circuit = QuantumCircuit(2) circuit.measure_all() circuit.draw(output='mpl', cregbundle=True)
ஒரு புதிய குவார்க், `` ஆரம்ப_நிலையம்``:func: qiskit.visualization.circuit_drawer செயல்பாடு மற்றும் :class:` ~ qiskit.circuit.QuantumCircuit` முறை:meth: ~ qiskit.circuit.QuantumCircuit இல் சேர்க்கப்பட்டுள்ளது. வரைய. `` உண்மை`` என அமைக்கப்பட்டால், ஆரம்ப நிலை இப்போது அனைத்து இழுப்பறைகளுக்கான சுற்று காட்சிப்படுத்தல்களில் சேர்க்கப்படும். முகவரிகள் வெளியீடு # 4293 <https://github.com/Qiskit/qiskit-terra/issues/4293> _.
உதாரணத்திற்கு:
from qiskit import QuantumCircuit circuit = QuantumCircuit(2) circuit.measure_all() circuit.draw(output='mpl', initial_state=True)
'Mpl' டிராயரைப் பயன்படுத்தும் போது லேபிள்கள் இப்போது காண்பிக்கப்படும். 2 வகையான லேபிள்கள் உள்ளன - கேட் லேபிள்கள் மற்றும் கட்டுப்பாட்டு லேபிள்கள். கேட் லேபிள்கள் காட்சியில் கேட் பெயரை மாற்றும். கட்டுப்பாட்டு லேபிள்கள் ஒரு வாயிலுக்கான கட்டுப்பாடுகளுக்கு மேலே அல்லது கீழே காண்பிக்கப்படும். சிக்கல்களை சரிசெய்கிறது # 3766, # 4580 முகவரிகள் சிக்கல்கள் # 3766 <https://github.com/Qiskit/qiskit-terra/issues/3766> _ மற்றும் #4580.
உதாரணத்திற்கு:
from qiskit import QuantumCircuit from qiskit.circuit.library.standard_gates import YGate circuit = QuantumCircuit(2) circuit.append(YGate(label='A Y Gate').control(label='Y Control'), [0, 1]) circuit.draw(output='mpl')
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
பல கட்டுப்படுத்தப்பட்ட எக்ஸ் கேட் (: வகுப்பு: ~ qiskit.circuit.library.MCXGrayCode ,: வகுப்பு:` ~ qiskit.circuit.library.MCXRecursive`, மற்றும்: வகுப்பு: ~ qiskit.circuit.library.MCXVChain `) அவற்றின் பெயர்` பண்புகள் அவற்றின் செயல்பாட்டை இன்னும் துல்லியமாக விவரிக்கும் வகையில் மாற்றப்பட்டுள்ளன:` mcx_gray`,` mcx_recursive`, மற்றும்` mcx_vchain` முறையே. முன்னதாக, இந்த வாயில்கள் `` mcx`` என்ற பெயரை: class: ~ qiskit.circuit.library.MCXGate உடன் பகிர்ந்து கொண்டன, இதனால் இந்த வாயில்கள் தவறாக மாற்றப்பட்டு உருவகப்படுத்தப்பட்டன.
முன்னிருப்பாக :mod:` qiskit.transpiler.preset_passmanagers ` :class:` ~ qiskit.transpiler.passes.UnrollCustomDefinitions ` மற்றும் :class:` ~ qiskit.transpiler.passes.BasisTranslator ` முன்னிருப்பு முன்னிருப்பு :class:` ~ qiskit.transpiler.passes.Unroller . இது புதிய கடைகள் அதிக மறுமலையானவை ஏனெனில் எந்த அடிப்படையில் அமைக்க அனுமதிக்கிறது, எனினும் வெளியீடு வேறுபடும். முந்தைய முன்னிருப்பு பயன்படுத்த நீங்கள் ` ` மொழிபெயர்த்தல் முறையை :func: ~ qiskit.compiler.compiler.transpile ` ` unroller ` `.
: Func: qiskit.converters.circuit_to_gate மற்றும்: func`qiskit.converters.circuit_to_instruction` மாற்றி செயல்பாடுகள் முன்பு தானாகவே உருவாக்கப்பட்ட கேட் அல்லது அறிவுறுத்தலை செயலில்` SessionEquivlanceLibrary` இல் தானாகவே சேர்த்திருந்தன. மாற்றப்பட்ட நிகழ்வுகள் எங்கே, எங்கு பதிவு செய்யப்பட வேண்டும் என்பதைக் குறிப்பிட இந்த மாற்றிகள் இப்போது விருப்பமான `` சமநிலை_ நூலகம்`` முக்கிய வாதத்தை ஏற்றுக்கொள்கின்றன. மாற்றப்பட்ட நிகழ்வை பதிவு செய்யாதபடி இயல்புநிலை நடத்தை மாற்றப்பட்டுள்ளது .
The default value of the
cregbundlekwarg for theqiskit.circuit.QuantumCircuit.draw()method andqiskit.visualization.circuit_drawer()function has been changed toTrue. This means that by default the classical bits in the circuit diagram will now be bundled by default, for example:from qiskit.circuit import QuantumCircuit circ = QuantumCircuit(4) circ.x(0) circ.h(1) circ.measure_all() circ.draw(output='mpl')
உங்கள் சர்க்யூட் வரைபடம் முந்தைய நடத்தையைத் தக்க வைத்துக் கொள்ள விரும்பினால், ஒவ்வொரு கிளாசிக்கல் பிட்டையும் வரைபடத்தில் காண்பிக்க விரும்பினால், நீங்கள்
cregbundleகுவார்க்கைFalseஎன அமைக்கலாம். உதாரணத்திற்கு:from qiskit.circuit import QuantumCircuit circ = QuantumCircuit(4) circ.x(0) circ.h(1) circ.measure_all() circ.draw(output='mpl', cregbundle=False)
Scheduleplotting withqiskit.pulse.Schedule.draw()andqiskit.visualization.pulse_drawer()will no longer display the event table by default. This can be reenabled by setting thetablekwarg toTrue.The pass
RemoveResetInZeroStatewas previously included in the preset pass managerlevel_0_pass_manager()which was used with theoptimization_level=0fortranspile()andexecute()functions. However,RemoveResetInZeroStateis an optimization pass and should not have been included in optimization level 0 and was removed. If you need to runtranspile()withRemoveResetInZeroStateeither use a custom pass manager oroptimization_level1, 2, or 3.The deprecated kwarg
line_lengthfor theqiskit.visualization.circuit_drawer()function andqiskit.circuit.QuantumCircuit.draw()method has been removed. It had been deprecated since the 0.10.0 release. Instead you can use thefoldkwarg to adjust the width of the circuit diagram.The
'mpl'output mode for theqiskit.circuit.QuantumCircuit.draw()method andcircuit_drawer()now requires the pylatexenc library to be installed. This was already an optional dependency for visualization, but was only required for the'latex'output mode before. It is now also required for the matplotlib drawer because it is needed to handle correctly sizing gates with matplotlib's mathtext labels for gates.The deprecated
get_tokensmethods for theqiskit.qasm.Qasmandqiskit.qasm.QasmParserhas been removed. These methods have been deprecated since the 0.9.0 release. Theqiskit.qasm.Qasm.generate_tokens()andqiskit.qasm.QasmParser.generate_tokens()methods should be used instead.The deprecated kwarg
channels_to_plotforqiskit.pulse.Schedule.draw(),qiskit.pulse.Instruction.draw(),qiskit.visualization.pulse.matplotlib.ScheduleDrawer.drawandpulse_drawer()has been removed. The kwarg has been deprecated since the 0.11.0 release and was replaced by thechannelskwarg, which functions identically and should be used instead.The deprecated
circuit_instruction_mapattribute of theqiskit.providers.models.PulseDefaultsclass has been removed. This attribute has been deprecated since the 0.12.0 release and was replaced by theinstruction_schedule_mapattribute which can be used instead.The
unionmethod ofScheduleandInstructionhave been deprecated since the 0.12.0 release and have now been removed. Useqiskit.pulse.Schedule.insert()andqiskit.pulse.Instruction.meth()methods instead with the kwarg``time=0``.The deprecated
scalingargument to thedrawmethod ofScheduleandInstructionhas been replaced withscalesince the 0.12.0 release and now has been removed. Use thescalekwarg instead.The deprecated
periodargument toqiskit.pulse.libraryfunctions have been replaced byfreqsince the 0.13.0 release and now removed. Use thefreqkwarg instead ofperiod.The
qiskit.pulse.commandsmodule containingCommandsclasses was deprecated in the 0.13.0 release and has now been removed. You will have to upgrade your Pulse code if you were still using commands. For example:பழைய
புதிய
Command(args)(channel)Instruction(args, channel)Acquire(duration)(AcquireChannel(0))
Acquire(duration, AcquireChannel(0))
Delay(duration)(channel)
Delay(duration, channel)
FrameChange(angle)(DriveChannel(0))
# FrameChange was also renamed ShiftPhase(angle, DriveChannel(0))
Gaussian(...)(DriveChannel(0))
# Pulses need to be `Play`d Play(Gaussian(...), DriveChannel(0))
All classes and function in the
qiskit.tool.qimodule were deprecated in the 0.12.0 release and have now been removed. Instead use theqiskit.quantum_infomodule and the new methods and classes that it has for working with quantum states and operators.The
qiskit.quantum_info.basis_stateandqiskit.quantum_info.projectorfunctions are deprecated as of Qiskit Terra 0.12.0 as are now removed. Use theqiskit.quantum_info.QuantumStateand its derivativesqiskit.quantum_info.Statevectorandqiskit.quantum_info.DensityMatrixto work with states.The interactive plotting functions from
qiskit.visualization,iplot_bloch_multivector,iplot_state_city,iplot_state_qsphere,iplot_state_hinton,iplot_histogram,iplot_state_paulivecnow are just deprecated aliases for the matplotlib based equivalents and are no longer interactive. The hosted static JS code that these functions relied on has been removed and they no longer could work. A normal deprecation wasn't possible because the site they depended on no longer exists.The validation components using marshmallow from
qiskit.validationhave been removed from terra. Since they are no longer used to build any objects in terra.The marshmallow schema classes in
qiskit.resulthave been removed since they are no longer used by theqiskit.result.Resultclass.The output of the
to_dict()method for theqiskit.result.Resultclass is no longer in a format for direct JSON serialization. Depending on the content contained in instances of these classes there may be types that the default JSON encoder doesn't know how to handle, for example complex numbers or numpy arrays. If you're JSON serializing the output of theto_dict()method directly you should ensure that your JSON encoder can handle these types.The option to acquire multiple qubits at once was deprecated in the 0.12.0 release and is now removed. Specifically, the init args
mem_slotsandreg_slotshave been removed fromqiskit.pulse.instructions.Acquire, andchannel,mem_slotandreg_slotwill raise an error if a list is provided as input.Support for the use of the
USE_RETWORKXenvironment variable which was introduced in the 0.13.0 release to provide an optional fallback to the legacy networkx basedqiskit.dagcircuit.DAGCircuitimplementation has been removed. This flag was only intended as provide a relief valve for any users that encountered a problem with the new implementation for one release during the transition to retworkx.The module within
qiskit.pulseresponsible for schedule->schedule transformations has been renamed fromreschedule.pytotransforms.py. The previous import path has been deprecated. To upgrade your code:from qiskit.pulse.rescheduler import <X>
should be replaced by:
from qiskit.pulse.transforms import <X>
In previous releases a
PassManagerdid not allowTransformationPassclasses to modify thePropertySet. This restriction has been lifted so aTransformationPassclass now has read and write access to both thePropertySetandDAGCircuitduringrun(). This change was made to more efficiently facilitateTransformationPassclasses that have an internal state which may be necessary for later passes in thePassManager. Without this change a second redundantAnalysisPasswould have been necessary to recreate the internal state, which could add significant overhead.
தேய்மான குறிப்புகள்¶
The name of the first positional parameter for the
qiskit.visualizationfunctionsplot_state_hinton(),plot_bloch_multivector(),plot_state_city(),plot_state_paulivec(), andplot_state_qsphere()has been renamed fromrhotostate. Passing in the value by name torhois deprecated and will be removed in a future release. Instead you should either pass the argument positionally or use the new parameter namestate.The
qiskit.pulse.pulse_libmodule has been deprecated and will be removed in a future release. It has been renamed toqiskit.pulse.librarywhich should be used instead.The
qiskit.circuit.QuantumCircuitmethodmirror()has been deprecated and will be removed in a future release. The methodqiskit.circuit.QuantumCircuit.reverse_ops()should be used instead, since mirroring could be confused with swapping the output qubits of the circuit. Thereverse_ops()method only reverses the order of gates that are applied instead of mirroring.The
qubits()andclbits()methods ofqiskit.dagcircuit.DAGCircuithave been deprecated and will be removed in a future release. They have been replaced with properties of the same name,qiskit.dagcircuit.DAGCircuit.qubitsandqiskit.dagcircuit.DAGCircuit.clbits, and are cached so accessing them is much faster.The
get_sample_pulsemethod forqiskit.pulse.library.ParametricPulsederived classes (for exampleGaussianSquare) has been deprecated and will be removed in a future release. It has been replaced by theget_waveformmethod (for exampleget_waveform()) which should behave identically.The use of the optional
conditionargument onqiskit.dagcircuit.DAGNode,qiskit.dagcircuit.DAGCircuit.apply_operation_back(), andqiskit.dagcircuit.DAGCircuit.apply_operation_front()has been deprecated and will be removed in a future release. Instead thecontrolset inqiskit.circuit.Instructioninstances being added to aDAGCircuitshould be used.The
set_atolandset_rtolclass methods of theqiskit.quantum_info.BaseOperatorandqiskit.quantum_info.QuantumStateclasses (and their subclasses such asOperatorandqiskit.quantum_info.DensityMatrix) are deprecated and will be removed in a future release. Instead the value for the attributes.atoland.rtolshould be set on the class instead. For example:from qiskit.quantum_info import ScalarOp ScalarOp.atol = 3e-5 op = ScalarOp(2)
The interactive plotting functions from
qiskit.visualization,iplot_bloch_multivector,iplot_state_city,iplot_state_qsphere,iplot_state_hinton,iplot_histogram,iplot_state_paulivechave been deprecated and will be removed in a future release. The matplotlib based equivalent functions fromqiskit.visualization,plot_bloch_multivector(),plot_state_city(),plot_state_qsphere(),plot_state_hinton(),plot_state_histogram(), andplot_state_paulivec()should be used instead.The properties
acquires,mem_slots, andreg_slotsof theqiskit.pulse.instructions.Acquirepulse instruction have been deprecated and will be removed in a future release. They are just duplicates ofchannel,mem_slot, andreg_slotrespectively now that previously deprecated support for using multiple qubits in a singleAcquireinstruction has been removed.The
SamplePulseclass fromqiskit.pulsehas been renamed toWaveform.SamplePulseis deprecated and will be removed in a future release.The style dictionary key
cregbundlehas been deprecated and will be removed in a future release. This has been replaced by the kwargcregbundleadded to theqiskit.visualization.circuit_drawer()function and theQuantumCircuitmethoddraw().
பிழை திருத்தங்கள்¶
The
qiskit.circuit.QuantumCircuitmethodnum_nonlocal_gatespreviously included multi-qubitqiskit.circuit.Instructionobjects (for example,Barrier) in its count of non-local gates. This has been corrected so that only non-localGateobjects are counted. Fixes #4500ControlledGateinstances with a setctrl_statewere in some cases not being evaluated as equal, even if the compared gates were equivalent. This has been resolved so that Fixes #4573When accessing a bit from a
qiskit.circuit.QuantumRegisterorqiskit.circuit.ClassicalRegisterby index when using numpy integer types <https://numpy.org/doc/stable/user/basics.types.html>`__ would previously raise aCircuitErrorexception. This has been resolved so numpy types can be used in addition to Python's built-ininttype. Fixes #3929.A bug was fixed where only the first
qiskit.pulse.configuration.Kernelorqiskit.pulse.configuration.Discriminatorfor anqiskit.pulse.Acquirewas used when there were multiple Acquires at the same time in aqiskit.pulse.Schedule.The SI unit use for constructing
qiskit.pulse.SetFrequencyobjects is in Hz, but when aPulseQobjInstructionobject is created from aSetFrequencyinstance it needs to be converted to GHz. This conversion was missing from previous releases and has been fixed.Previously it was possible to set the number of control qubits to zero in which case the the original, potentially non-controlled, operation would be returned. This could cause an
AttributeErrorto be raised if the caller attempted to access an attribute which onlyControlledGateobject have. This has been fixed by adding a getter and setter fornum_ctrl_qubitsto validate that a valid value is being used. Fixes #4576Open controls were implemented by modifying a
Gateobjectsdefinition. However, when the gate already exists in the basis set, this definition was not used, which resulted in incorrect circuits being sent to a backend after transpilation. This has been fixed by modifying theUnrollerpass to use the definition if it encounters a controlled gate with open controls. Fixes #4437The
insert_barrierskeyword argument in theZZFeatureMapclass didn't actually insert barriers in between the Hadamard layers and evolution layers. This has been fixed so that barriers are now properly inserted.Fixed issue where some gates with three or more qubits would fail to compile in certain instances. Refer to #4577 <https://github.com/Qiskit/qiskit-terra/issues/4577 for more detail.
The matplotlib (
'mpl') output backend for theqiskit.circuit.QuantumCircuitmethoddraw()and theqiskit.visualization.circuit_drawer()function was not properly scaling when the kwargscalewas set. Fonts and line widths did not scale with the rest of the image. This has been fixed and all elements of the circuit diagram now scale properly. For example:from qiskit import QuantumCircuit circuit = QuantumCircuit(2) circuit.h(0) circuit.cx(0, 1) circuit.draw(output='mpl', scale=0.5)
Fixes #4179.
Fixes issue where initializing or evolving
qiskit.quantum_info.Statevectorandqiskit.quantum_info.DensityMatrixclasses by circuits by circuit containingBarrierinstructions would raise an exception. Fixes #4461Previously when a
QuantumCircuitcontained aGatewith a classical condition the transpiler would sometimes fail when usingoptimization_level=3ontranspile()orexecute()raising anUnboundLocalError. This has been fixed by updating theConsolidateBlockspass to account for the classical condition. Fixes #4672.In some situations long gate and register names would overflow, or leave excessive empty space around them when using the
'mpl'output backend for theqiskit.circuit.QuantumCircuit.draw()method andqiskit.visualization.circuit_drawer()function. This has been fixed by using correct text widths for a proportional font. Fixes #4611, #4605, #4545, #4497, #4449, and #3641.When using the
style` kwarg on the :meth:`qiskit.circuit.QuantumCircuit.draw` or :func:`qiskit.visualization.circuit_drawer` with the ``'mpl'output backend the dictionary key'showindex'set toTrue, the index numbers at the top of the column did not line up properly. This has been fixed.When using
cregbunde=Truewith the'mpl'output backend for theqiskit.circuit.QuantumCircuit.draw()method andqiskit.visualization.circuit_drawer()function and measuring onto a second fold, the measure arrow would overwrite the creg count. The count was moved to the left to prevent this. Fixes #4148.When using the
'mpl'output backend for theqiskit.circuit.QuantumCircuit.draw()method andqiskit.visualization.circuit_drawer()functionCSwapGategates and a controlledRZZGategates now display with their appropriate symbols instead of in a box.When using the
'mpl'output backend for theqiskit.circuit.QuantumCircuit.draw()method andqiskit.visualization.circuit_drawer()function controlled gates created using theto_gate()method were not properly spaced and could overlap with other gates in the circuit diagram. This issue has been fixed.When using the
'mpl'output backend for theqiskit.circuit.QuantumCircuit.draw()method andqiskit.visualization.circuit_drawer()function gates with arrays as parameters, such asHamiltonianGate, no longer display with excessive space around them. Fixes #4352.When using the
'mpl'output backend for theqiskit.circuit.QuantumCircuit.draw()method andqiskit.visualization.circuit_drawer()function generic gates created by directly instantiatingqiskit.circuit.Gatemethod now display the proper background color for the gate. Fixes #4496.When using the
'mpl'output backend for theqiskit.circuit.QuantumCircuit.draw()method andqiskit.visualization.circuit_drawer()function anAttributeErrorthat occurred when usingIsometryorInitializehas been fixed. Fixes #4439.When using the
'mpl'output backend for theqiskit.circuit.QuantumCircuit.draw()method andqiskit.visualization.circuit_drawer()function some open-controlled gates did not properly display the open controls. This has been corrected so that open controls are properly displayed as open circles. Fixes #4248.When using the
'mpl'output backend for theqiskit.circuit.QuantumCircuit.draw()method andqiskit.visualization.circuit_drawer()function setting thefoldkwarg to -1 will now properly display the circuit without folding. Fixes #4506.Parametric pulses from
qiskit.pulse.library.discretenow have zero ends of parametric pulses by default. The endpoints are defined such that for a function \(f(x)\) then \(f(-1) = f(duration + 1) = 0\). Fixes #4317
பிற குறிப்புகள்¶
The
qiskit.result.Resultclass which was previously constructed using the marshmallow library has been refactored to not depend on marshmallow anymore. This new implementation should be a seamless transition but some specific behavior that was previously inherited from marshmallow may not work. Please file issues for any incompatibilities found.
Aer 0.6.1¶
முன்னுரை¶
This 0.6.0 release includes numerous performance improvements for all simulators in the Aer provider and significant changes to the build system when building from source. The main changes are support for SIMD vectorization, approximation in the matrix product state method via bond-dimension truncation, more efficient Pauli expectation value computation, and greatly improved efficiency in Python conversion of C++ result objects. The build system was upgraded to use the Conan to manage common C++ dependencies when building from source.
புதிய அம்சங்கள்¶
Add density matrix snapshot support to "statevector" and "statevector_gpu" methods of the QasmSimulator.
Allow density matrix snapshots on specific qubits, not just all qubits. This computes the partial trace of the state over the remaining qubits.
Adds Pauli expectation value snapshot support to the "density_matrix" simulation method of the
qiskit.providers.aer.QasmSimulator. Add snapshots to circuits using theqiskit.providers.aer.extensions.SnapshotExpectationValueextension.Greatly improves performance of the Pauli expectation value snapshot algorithm for the "statevector", "statevector_gpu, "density_matrix", and "density_matrix_gpu" simulation methods of the
qiskit.providers.aer.QasmSimulator.Enable the gate-fusion circuit optimization from the
qiskit.providers.aer.QasmSimulatorin both theqiskit.providers.aer.StatevectorSimulatorandqiskit.providers.aer.UnitarySimulatorbackends.Improve the performance of average snapshot data in simulator results. This effects probability, Pauli expectation value, and density matrix snapshots using the following extensions:
: வகுப்பு: கிஸ்கிட். வழங்குநர்கள்.ஏயர். நீட்டிப்புகள். ஸ்னாப்ஷாட் எதிர்பார்ப்பு மதிப்பு
: வகுப்பு: `qiskit.providers.aer.extensions.SnapshotDensityMatrix
நடவடிக்கை உருவாக்கு மற்றும் C++ மாட்ரிக்ஸ் வகுப்பின் நினைவு பயன்பாட்டை மேம்படுத்துவதற்கு மாட்ரிகளின் நகல்களை சிறிது செய்யவும்.
ஒருங்கிணைப்புச் செயல்திறன் செயற்பாடு.
` "matrix_product_state" ` தனிப்பயன் முறையை :class:` ~ qiskkit.देगा ஏற்றுமதி முறைக்கு சேர். எம். எம். எஸ். QasmSimulator ` எம். எம். எஸ். எம்.
தோராயமான இரண்டு முறைகள் உள்ளன. இருவரும் எஸ்.வி.டி வழிமுறையைப் பின்பற்றி மிகச்சிறிய ஷ்மிட் குணகங்களை நிராகரிக்கின்றனர். தோராயமான அளவைக் கட்டுப்படுத்தும் இரண்டு அளவுருக்கள் உள்ளன: `` "matrix_product_state_max_bond_dimension" `` (int): svd வழிமுறையின் முடிவில் தக்கவைக்கப்பட்ட ஷ்மிட் குணகங்களின் எண்ணிக்கையில் வரம்பை அமைக்கிறது. இந்த வரம்பைத் தாண்டிய குணகங்கள் நிராகரிக்கப்படும். (இயல்புநிலை: எதுவுமில்லை, அதாவது, பத்திர பரிமாணத்தில் வரம்பு இல்லை). `` "matrix_product_state_truncation_threshold" `` (இரட்டை): அவற்றின் சதுரங்களின் தொகை இந்த வாசலை விட சிறியதாக இருக்கும் மிகச்சிறிய குணகங்களை நிராகரிக்கவும். (இயல்புநிலை: 1e-16).
" Matrix_product_state ": வகுப்பு: `~ qiskit.providers.aer.QasmSimulator உருவகப்படுத்துதல் முறையைப் பயன்படுத்தும் போது அளவீட்டு மாதிரியின் செயல்திறனை மேம்படுத்தவும்.
` தாமதம், `` கட்டம்`` மற்றும் `` செட்ஃபேஸ்`` துடிப்பு வழிமுறைகளுக்கு ஆதரவைச் சேர்க்கவும்: வகுப்பு: `qiskit.providers.aer.PulseSimulator.RHS செயல்பாட்டிற்கான அழைப்புகளை கேச் செய்வதன் மூலம்: வகுப்பின் செயல்திறனை மேம்படுத்தவும்: qiskit.providers.aer.PulseSimulator
வகுப்பில் `` பின்தளத்தில்_ விருப்பங்கள்`` மூலம் குறிப்பிடக்கூடிய மாற்று DE தீர்க்கும் முறைகளை அறிமுகப்படுத்துங்கள்: qiskit.providers.aer.PulseSimulator.
வெப்பம் சிக்குறுத்தும் விளைவுகளைக் கொண்டு செயற்படும் வகுப்புகளைப் பயன்படுத்தி முடிவுகளின் விளைவுகளைக் கொண்டு இறுதியான விளைவுகளின் விளைவுகளைக் கொண்டு இறுதியாக நிகழ்கிறது.
Greatly செயல்திறன் பைபிண்ட் 11 மாற்றத்திற்கான செயல்திறனை மேம்படுத்துவதால் நுழைவுகளின் முடிவுகளைக் கொண்டு செல்லுபடியாகும், மற்றும் நகரும் வெக்டர் மற்றும் மாட்ரிக்ஸ் முடிவுகளால் Numpy arrays to Numpy arrays to Numpy arrays.
RNG இயந்திரத்தை 32-பிட் மெர்ஸ்விலிருந்து 64-பிட் மெர்ஸ்வின்ட் டிஸ்ரேட் இயந்திரத்தில் மாற்று.
வகுப்பு: qiskit.providers.aer.QasmSimulator மற்றும்: வகுப்பு:` qiskit.providers.aer.StatevectorSimulator` இன் " ஸ்டேட்வெக்டர் " உருவகப்படுத்துதல் முறையின் செயல்திறனை மேம்படுத்துகிறது அமை. AVX2 ஆதரவு தானாகவே கண்டறியப்பட்டு இயக்க நேரத்தில் இயக்கப்படும்.
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
Changes the build system to use the Conan package manager. This tool will handle most of the dependencies needed by the C++ source code. Internet connection may be needed for the first build or when dependencies are added or updated, in order to download the required packages if they are not in your Conan local repository.
When building the standalone version of qiskit-aer you must install conan first with:
pip install conan
Changes how transpilation passes are handled in the C++ Controller classes so that each pass must be explicitly called. This allows for greater customization on when each pass should be called, and with what parameters. In particular this enables setting different parameters for the gate fusion optimization pass depending on the QasmController simulation method.
Add
gate_length_unitskwarg toqiskit.providers.aer.noise.NoiseModel.from_device()for specifying customgate_lengthsin the device noise model function to handle unit conversions for internal code.Add Controlled-Y ("cy") gate to the Stabilizer simulator methods supported gateset.
For Aer's backend the jsonschema validation of input qobj objects from terra is now opt-in instead of being enabled by default. If you want to enable jsonschema validation of qobj set the
validatekwarg on theqiskit.providers.aer.QasmSimualtor.run()method for the backend object toTrue.Adds an OpSet object to the base simulator State class to allow easier validation of instructions, gates, and snapshots supported by simulators.
Refactor OpSet class. Moved OpSet to separate header file and add
containsanddifferencemethods based onstd::set::containsandstd::algorithm::set_difference. These replace the removed invalid and validate instructions from OpSet, but with the order reversed. It returns a list of other ops not in current opset rather than opset instructions not in the other.Improves how measurement sampling optimization is checked. The expensive part of this operation is now done once during circuit construction where rather than multiple times during simulation for when checking memory requirements, simulation method, and final execution.
பிழை திருத்தங்கள்¶
Remove "extended_stabilizer" from the automatically selected simulation methods. This is needed as the extended stabilizer method is not exact and may give incorrect results for certain circuits unless the user knows how to optimize its configuration parameters.
The automatic method now only selects from "stabilizer", "density_matrix", and "statevector" methods. If a non-Clifford circuit that is too large for the statevector method is executed an exception will be raised suggesting you could try explicitly using the "extended_stabilizer" or "matrix_product_state" methods instead.
Disables gate fusion for the matrix product state simulation method as this was causing issues with incorrect results being returned in some cases.
Fixes a bug causing incorrect channel evaluation in the
qiskit.providers.aer.PulseSimulator.Fixes several minor bugs for Hamiltonian parsing edge cases in the
qiskit.providers.aer.pulse.system_models.hamiltonian_model.HamiltonianModelclass.
Ignis 0.4.0¶
முன்னுரை¶
The main change made in this release is a refactor of the Randomized
Benchmarking code to integrate the updated Clifford class
qiskit.quantum_info.Clifford from Terra and to improve the
CNOT-Dihedral class.
புதிய அம்சங்கள்¶
The
qiskit.ignis.verification.randomized_benchmarking.randomized_benchmarking_seq()function was refactored to use the updated Clifford classClifford, to allow efficient Randomized Benchmarking (RB) on Clifford sequences with more than 2 qubits. In addition, the code of the CNOT-Dihedral classqiskit.ignis.verification.randomized_benchmarking.CNOTDihedralwas refactored to make it more efficient, by using numpy arrays, as well not using pre-generated pickle files storing all the 2-qubit group elements. Theqiskit.ignis.verification.randomized_benchmarking.randomized_benchmarking_seq()function has a new kwargrand_seedwhich can be used to specify a seed for the random number generator used to generate the RB circuits. This can be useful for having a reproducible circuit.The
qiskit.ignis.verification.qv_circuits()function has a new kwargseedwhich can be used to specify a seed for the random number generator used to generate the Quantum Volume circuits. This can be useful for having a reproducible circuit.
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
The
qiskit.ignis.verification.randomized_benchmarking.randomized_benchmarking_seq()function is now using the updated Clifford classCliffordand the updated CNOT-Dihedral classqiskit.ignis.verification.randomized_benchmarking.CNOTDihedralto construct its output instead of using pre-generated group tables for the Clifford and CNOT-Dihedral group elements, which were stored in pickle files. This may result in subtle differences from the output from the previous version.A new requirement scikit-learn has been added to the requirements list. This dependency was added in the 0.3.0 release but wasn't properly exposed as a dependency in that release. This would lead to an
ImportErrorif theqiskit.ignis.measurement.discriminator.iq_discriminatorsmodule was imported. This is now correctly listed as a dependency so thatscikit-learnwill be installed with qiskit-ignis.The
qiskit.ignis.verification.qv_circuits()function is now using the circuit library classQuantumVolumeto construct its output instead of building the circuit from scratch. This may result in subtle differences from the output from the previous version.Tomography fitters can now also get list of Result objects instead of a single Result as requested in issue #320.
தேய்மான குறிப்புகள்¶
The kwarg
interleaved_gatesfor theqiskit.ignis.verification.randomized_benchmarking.randomized_benchmarking_seq()function has been deprecated and will be removed in a future release. It is superseded byinterleaved_elem. The helper functionsqiskit.ignis.verification.randomized_benchmarking.BasicUtils,qiskit.ignis.verification.randomized_benchmarking.CliffordUtilsandqiskit.ignis.verification.randomized_benchmarking.DihedralUtilswere deprecated. These classes are superseded byqiskit.ignis.verification.randomized_benchmarking.RBgroupthat handles the group operations needed for RB. The classqiskit.ignis.verification.randomized_benchmarking.Cliffordis superseded byClifford.The kwargs
qrandcrfor theqiskit.ignis.verification.qv_circuits()function have been deprecated and will be removed in a future release. These kwargs were documented as being used for specifying aqiskit.circuit.QuantumRegisterandqiskit.circuit.ClassicalRegisterto use in the generated Quantum Volume circuits instead of creating new ones. However, the parameters were never actually respected and a new Register would always be created regardless of whether they were set or not. This behavior is unchanged and these kwargs still do not have any effect, but are being deprecated prior to removal to avoid a breaking change for users who may have been setting either.Support for passing in subsets of qubits as a list in the
qubit_listsparameter for theqiskit.ignis.verification.qv_circuits()function has been deprecated and will removed in a future release. In the past this was used to specify a layout to run the circuit on a device. In other words if you had a 5 qubit device and wanted to run a 2 qubit QV circuit on qubits 1, 3, and 4 of that device. You would pass in[1, 3, 4]as one of the lists inqubit_lists, which would generate a 5 qubit virtual circuit and have qv applied to qubits 1, 3, and 4 in that virtual circuit. However, this functionality is not necessary and overlaps with the concept ofinitial_layoutin the transpiler and whether a circuit has been embedded with a layout set. Moving forward instead you should just runtranspile()orexecute()with initial layout set to do this. For example, running the above example would become:from qiskit import execute from qiskit.ignis.verification import qv_circuits initial_layout = [1, 3, 4] qv_circs, _ = qv_circuits([list(range3)]) execute(qv_circuits, initial_layout=initial_layout)
பிழை திருத்தங்கள்¶
Fix a bug of the position of measurement pulses inserted by py:func:qiskit.ignis.characterization.calibrations.pulse_schedules.drag_schedules. Fixes #465
அக்வா 0.7.5¶
புதிய அம்சங்கள்¶
Removed soft dependency on CPLEX in ADMMOptimizer. Now default optimizers used by ADMMOptimizer are MinimumEigenOptimizer for QUBO problems and SlsqpOptimizer as a continuous optimizer. You can still use CplexOptimizer as an optimizer for ADMMOptimizer, but it should be set explicitly.
New Yahoo! finance provider created.
Introduced
QuadraticProgramConverterwhich is an abstract class for converters. Addedconvert/interpretmethods for converters instead ofencode/decode. Addedto_isingandfrom_isingtoQuadraticProgramclass. Moved all parameters fromconvertto constructor exceptname. Created setter/getter for converter parameters. Addedauto_define_penaltyandinterpretfor``LinearEqualityToPenalty``. Now error messages of converters are more informative.Added an SLSQP optimizer
qiskit.optimization.algorithms.SlsqpOptimizeras a wrapper of the corresponding SciPy optimization method. This is a classical optimizer, does not depend on quantum algorithms and may be used as a replacement forCobylaOptimizer.Cobyla optimizer has been modified to accommodate a multi start feature introduced in the SLSQP optimizer. By default, the optimizer does not run in the multi start mode.
The
SummedOpdoes a mathematically more correct check for equality, where expressions such asX + X == 2*XandX + Z == Z + Xevaluate toTrue.
தேய்மான குறிப்புகள்¶
GSLS optimizer class deprecated
__init__parametermax_iterin favor ofmaxiter. SPSA optimizer class deprecated__init__parametermax_trialsin favor ofmaxiter. optimize_svm function deprecatedmax_itersparameter in favor ofmaxiter. ADMMParameters class deprecated__init__parametermax_iterin favor ofmaxiter.The ising convert classes
qiskit.optimization.converters.QuadraticProgramToIsingandqiskit.optimization.converters.IsingToQuadraticProgramhave been deprecated and will be removed in a future release. Instead theqiskit.optimization.QuadraticProgrammethodsto_ising()andfrom_ising()should be used instead.The
pprint_as_stringmethod forqiskit.optimization.QuadraticProgramhas been deprecated and will be removed in a future release. Instead you should just run.pprint_as_string()on the output fromto_docplex()The
prettyprintmethod forqiskit.optimization.QuadraticProgramhas been deprecated and will be removed in a future release. Instead you should just run.prettyprint()on the output fromto_docplex()
பிழை திருத்தங்கள்¶
Changed in python version 3.8: On macOS, the spawn start method is now the default. The fork start method should be considered unsafe as it can lead to crashes in subprocesses. However P_BFGS doesn't support spawn, so we revert to single process. Refer to #1109 <https://github.com/Qiskit/qiskit-aqua/issues/1109> for more details.
Binding parameters in the
CircuitStateFndid not copy the value ofis_measurementand always setis_measurement=False. This has been fixed.Previously, SummedOp.to_matrix_op built a list MatrixOp's (with numpy matrices) and then summed them, returning a single MatrixOp. Some algorithms (for example vqe) require summing thousands of matrices, which exhausts memory when building the list of matrices. With this change, no list is constructed. Rather, each operand in the sum is converted to a matrix, added to an accumulator, and discarded.
Changing backends in VQE from statevector to qasm_simulator or real device was causing an error due to CircuitSampler incompatible reuse. VQE was changed to always create a new CircuitSampler and create a new expectation in case not entered by user. Refer to #1153 <https://github.com/Qiskit/qiskit-aqua/issues/1153> for more details.
Exchange and Wikipedia finance providers were fixed to correctly handle Quandl data. Refer to #775 <https://github.com/Qiskit/qiskit-aqua/issues/775> for more details. Fixes a divide by 0 error on finance providers mean vector and covariance matrix calculations. Refer to #781 <https://github.com/Qiskit/qiskit-aqua/issues/781> for more details.
The
ListOp.combo_fnproperty has been lost in several transformations, such as converting to another operator type, traversing, reducing or multiplication. Now this attribute is propagated to the resulting operator.The evaluation of some operator expressions, such as of
SummedOp``s and evaluations with the ``CircuitSamplerdid not treat coefficients correctly or ignored them completely. E.g. evaluating~StateFn(0 * (I + Z)) @ Plusdid not yield 0 or the normalization of~StateFn(I) @ ((Plus + Minus) / sqrt(2))missed a factor ofsqrt(2). This has been fixed.OptimizationResultincluded some public setters and class variables wereOptional. This fix makes all class variables read-only so that mypy and pylint can check types more effectively.MinimumEigenOptimizer.solvegenerated bitstrings in a result asstr. This fix changed the result intoList[float]as the other algorithms do. Some public classes related to optimization algorithms were missing in the documentation ofqiskit.optimization.algorithms. This fix added all such classes to the docstring. #1131 <https://github.com/Qiskit/qiskit-aqua/issues/1131> for more details.OptimizationResult.__init__did not check whether the sizes ofxandvariablesmatch or not (they should match). This fix added the check to raise an error if they do not match and fixes bugs detected by the check. This fix also adds missing unit tests related toOptimizationResult.variable_namesandOptimizationResult.variables_dictintest_converters. #1167 <https://github.com/Qiskit/qiskit-aqua/issues/1167> for more details.Fix parameter binding in the
OperatorStateFn, which did not bind parameters of the underlying primitive but just the coefficients.op.eval(other), whereopis of typeOperatorBase, sometimes silently returns a nonsensical value when the number of qubits inopandotherare not equal. This fix results in correct behavior, which is to throw an error rather than return a value, because the input in this case is invalid.The
construct_circuitmethod ofVQEpreviously returned the expectation value to be evaluated as typeOperatorBase. This functionality has been moved intoconstruct_expectationandconstruct_circuitreturns a list of the circuits that are evaluated to compute the expectation value.
IBM Q வழங்கி 0. 8. 0¶
புதிய அம்சங்கள்¶
IBMQBackendnow has a newreservations()method that returns reservation information for the backend, with optional filtering. In addition, you can now useprovider.backends.my_reservations()to query for your own reservations.qiskit.providers.ibmq.job.IBMQJob.result()raises anIBMQJobFailureErrorexception if the job has failed. The exception message now contains the reason the job failed, if the entire job failed for a single reason.A new attribute
client_versionwas added toIBMQJobandqiskit.result.Resultobject retrieved viaqiskit.providers.ibmq.job.IBMQJob.result().client_versionis a dictionary with the key being the name and the value being the version of the client used to submit the job, such as Qiskit.The
least_busy()function now takes a new, optional parameterreservation_lookahead. If specified or defaulted to, a backend is considered unavailable if it has reservations in the nextnminutes, wherenis the value ofreservation_lookahead. For example, if the default value of 60 is used, then any backends that have reservations in the next 60 minutes are considered unavailable.ManagedResultsnow has a newcombine_results()method that combines results from all managed jobs and returns a singleResultobject. ThisResultobject can be used, for example, inqiskit-ignisfitter methods.
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
Timestamps in the following fields are now in local time instead of UTC:
Backend properties returned by
qiskit.providers.ibmq.IBMQBackend.properties().Backend properties returned by
qiskit.providers.ibmq.job.IBMQJob.properties().estimated_start_timeandestimated_complete_timeinQueueInfo, returned byqiskit.providers.ibmq.job.IBMQJob.queue_info().dateinResult, returned byqiskit.providers.ibmq.job.IBMQJob.result().
In addition, the
datetimeparameter forqiskit.providers.ibmq.IBMQBackend.properties()is also expected to be in local time unless it has UTC timezone information.websockets8.0 or above is now required if Python 3.7 or above is used.websockets7.0 will continue to be used for Python 3.6 or below.On Windows, the event loop policy is set to
WindowsSelectorEventLoopPolicyinstead of using the defaultWindowsProactorEventLoopPolicy. This fixes the issue that theqiskit.providers.ibmq.job.IBMQJob.result()method could hang on Windows. Fixes #691
தேய்மான குறிப்புகள்¶
Use of
Qconfig.pyto save IBM Quantum Experience credentials is deprecated and will be removed in the next release. You should useqiskitrc(the default) instead.
பிழை திருத்தங்கள்¶
Fixes an issue wherein a call to
qiskit.providers.ibmq.IBMQBackend.jobs()can hang if the number of jobs being returned is large. Fixes #674Fixes an issue which would raise a
ValueErrorwhen building error maps in Jupyter for backends that are offline. Fixes #706qiskit.providers.ibmq.IBMQBackend.jobs()will now return the correct list ofIBMQJobobjects when thestatuskwarg is set to'RUNNING'.The package metadata has been updated to properly reflect the dependency on
qiskit-terra>= 0.14.0. This dependency was implicitly added as part of the 0.7.0 release but was not reflected in the package requirements so it was previously possible to installqiskit-ibmq-providerwith a version ofqiskit-terrawhich was too old. Fixes #677
Qiskit 0.19.6¶
Terra 0.14.2¶
No Change
Aer 0.5.2¶
No Change
Ignis 0.3.3¶
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
A new requirement scikit-learn has been added to the requirements list. This dependency was added in the 0.3.0 release but wasn't properly exposed as a dependency in that release. This would lead to an
ImportErrorif theqiskit.ignis.measurement.discriminator.iq_discriminatorsmodule was imported. This is now correctly listed as a dependency so thatscikit-learnwill be installed with qiskit-ignis.
பிழை திருத்தங்கள்¶
Fixes an issue in qiskit-ignis 0.3.2 which would raise an
ImportErrorwhenqiskit.ignis.verification.tomography.fitters.process_fitterwas imported withoutcvxpybeing installed.
Aqua 0.7.3¶
No Change
IBM Q Provider 0.7.2¶
No Change
Qiskit 0.19.5¶
Terra 0.14.2¶
No Change
Aer 0.5.2¶
No Change
Ignis 0.3.2¶
பிழை திருத்தங்கள்¶
The
qiskit.ignis.verification.TomographyFitter.fit()method has improved detection logic for the default fitter. Previously, thecvxfitter method was used whenever cvxpy was installed. However, it was possible to install cvxpy without an SDP solver that would work for thecvxfitter method. This logic has been reworked so that thecvxfitter method is only used ifcvxpyis installed and an SDP solver is present that can be used. Otherwise, thelstsqfitter is used.Fixes an edge case in
qiskit.ignis.mitigation.measurement.fitters.MeasurementFitter.apply()for input that has invalid or incorrect state labels that don't match the calibration circuit. Previously, this would not error and just return an empty result. Instead now this case is correctly caught and aQiskitErrorexception is raised when using incorrect labels.
Aqua 0.7.3¶
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
The cvxpy dependency which is required for the svm classifier has been removed from the requirements list and made an optional dependency. This is because installing cvxpy is not seamless in every environment and often requires a compiler be installed to run. To use the svm classifier now you'll need to install cvxpy by either running
pip install cvxpy<1.1.0or to install it with aqua runningpip install qiskit-aqua[cvx].
பிழை திருத்தங்கள்¶
The
composemethod of theCircuitOpusedQuantumCircuit.combinewhich has been changed to useQuantumCircuit.compose. Using combine leads to the problem that composing an operator with aCircuitOpbased on a named register does not chain the operators but stacks them. E.g. composingZ ^ 2with a circuit based on a 2-qubit named register yielded a 4-qubit operator instead of a 2-qubit operator.The
MatrixOp.to_instructionmethod previously returned an operator and not an instruction. This method has been updated to return an Instruction. Note that this only works if the operator primitive is unitary, otherwise an error is raised upon the construction of the instruction.The
__hash__method of thePauliOpclass used theid()method which prevents set comparisons to work as expected since they rely on hash tables and identical objects used to not have identical hashes. Now, the implementation uses a hash of the string representation inline with the implementation in thePauliclass.
IBM Q Provider 0.7.2¶
No Change
Qiskit 0.19.4¶
Terra 0.14.2¶
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
The
circuit_to_gateandcircuit_to_instructionconverters had previously automatically included the generated gate or instruction in the activeSessionEquivalenceLibrary. These converters now accept an optionalequivalence_librarykeyword argument to specify if and where the converted instances should be registered. The default behavior is not to register the converted instance.
பிழை திருத்தங்கள்¶
Implementations of the multi-controlled X Gate (
MCXGrayCode,MCXRecursiveandMCXVChain) have had theirnameproperties changed to more accurately describe their implementation (mcx_gray,mcx_recursive, andmcx_vchainrespectively.) Previously, these gates shared the namemcx` with ``MCXGate, which caused these gates to be incorrectly transpiled and simulated.ControlledGateinstances with a setctrl_statewere in some cases not being evaluated as equal, even if the compared gates were equivalent. This has been resolved.Fixed the SI unit conversion for
qiskit.pulse.SetFrequency. TheSetFrequencyinstruction should be in Hz on the frontend and has to be converted to GHz whenSetFrequencyis converted toPulseQobjInstruction.Open controls were implemented by modifying a gate's definition. However, when the gate already exists in the basis, this definition is not used, which yields incorrect circuits sent to a backend. This modifies the unroller to output the definition if it encounters a controlled gate with open controls.
Aer 0.5.2¶
No Change
Ignis 0.3.0¶
No Change
Aqua 0.7.2¶
முன்னுரை¶
Aer qasm_ simulator யுடன் VQE எதிர்பார்ப்பு கணக்கீடு இப்போது எதிர்பார்க்கப்பட்ட சுழல் நடத்தை கணக்கிடும்.
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
cvxpy is now in the requirements list as a dependency for qiskit-aqua. It is used for the quadratic program solver which is used as part of the
qiskit.aqua.algorithms.QSVM. Previouslycvxoptwas an optional dependency that needed to be installed to use this functionality. This is no longer required as cvxpy will be installed with qiskit-aqua.For state tomography run as part of
qiskit.aqua.algorithms.HHLwith a QASM backend the tomography fitter functionqiskit.ignis.verification.StateTomographyFitter.fit()now gets called explicitly with the method set tolstsqto always use the least-squares fitting. Previously it would opportunistically try to use thecvxfitter ifcvxpywere installed. But, thecvxfitter depends on a specifically configuredcvxpyinstallation with an SDP solver installed as part ofcvxpywhich is not always present in an environment withcvxpyinstalled.The VQE expectation computation using qiskit-aer's
qiskit.providers.aer.extensions.SnapshotExpectationValueinstruction is not enabled by default anymore. This was changed to be the default in 0.7.0 because it is significantly faster, but it led to unexpected ideal results without shot noise (see #1013 for more details). The default has now changed back to match user expectations. Using the faster expectation computation is now opt-in by setting the newinclude_customkwarg toTrueon theqiskit.aqua.algorithms.VQEconstructor.
புதிய அம்சங்கள்¶
A new kwarg
include_customhas been added to the constructor forqiskit.aqua.algorithms.VQEand it's subclasses (mainlyqiskit.aqua.algorithms.QAOA). When set to true and theexpectationkwarg is set toNone(the default) this will enable the use of VQE expectation computation with Aer'sqasm_simulatorqiskit.providers.aer.extensions.SnapshotExpectationValueinstruction. The special Aer snapshot based computation is much faster but with the ideal output similar to state vector simulator.
IBM Q Provider 0.7.2¶
No Change
Qiskit 0.19.3¶
Terra 0.14.1¶
No Change
Aer 0.5.2¶
பிழை திருத்தங்கள்¶
Fixed bug with statevector and unitary simulators running a number of (parallel) shots equal to the number of CPU threads instead of only running a single shot.
Fixes the "diagonal" qobj gate instructions being applied incorrectly in the density matrix Qasm Simulator method.
Fixes bug where conditional gates were not being applied correctly on the density matrix simulation method.
Fix bug in CZ gate and Z gate for "density_matrix_gpu" and "density_matrix_thrust" QasmSimulator methods.
Fixes issue where memory requirements of simulation were not being checked on the QasmSimulator when using a non-automatic simulation method.
Fixed a memory leak that effected the GPU simulator methods
Ignis 0.3.0¶
No Change
Aqua 0.7.1¶
No Change
IBM Q Provider 0.7.2¶
பிழை திருத்தங்கள்¶
qiskit.provider.ibmq.IBMQBackend.jobs()will now return the correct list ofIBMQJobobjects when thestatuskwarg is set to'RUNNING'. Fixes #523The package metadata has been updated to properly reflect the dependency on
qiskit-terra>= 0.14.0. This dependency was implicitly added as part of the 0.7.0 release but was not reflected in the package requirements so it was previously possible to installqiskit-ibmq-providerwith a version ofqiskit-terrawhich was too old. Fixes #677
Qiskit 0.19.0¶
Terra 0.14.0¶
முன்னுரை¶
The 0.14.0 release includes several new features and bug fixes. The biggest
change for this release is the introduction of a quantum circuit library
in qiskit.circuit.library, containing some circuit families of
interest.
The circuit library gives users access to a rich set of well-studied circuit families, instances of which can be used as benchmarks, as building blocks in building more complex circuits, or as a tool to explore quantum computational advantage over classical. The contents of this library will continue to grow and mature.
The initial release of the circuit library contains:
standard_gates: these are fixed-width gates commonly used as primitive building blocks, consisting of 1, 2, and 3 qubit gates. For example theXGate,RZZGateandCSWAPGate. The old location of these gates underqiskit.extensions.standardis deprecated.generalized_gates: these are families that can generalize to arbitrarily many qubits, for example aPermutationorGMS(Global Molmer-Sorensen gate).boolean_logic: circuits that transform basis states according to simple Boolean logic functions, such asADDorXOR.arithmetic: a set of circuits for doing classical arithmetic such asWeightedAdderandIntegerComparator.basis_changes: circuits such as the quantum Fourier transform,QFT, that mathematically apply basis changes.n_local: patterns to easily create large circuits with rotation and entanglement layers, such asTwoLocalwhich uses single-qubit rotations and two-qubit entanglements.data_preparation: circuits that take classical input data and encode it in a quantum state that is difficult to simulate, e.g.PauliFeatureMaporZZFeatureMap.Other circuits that have proven interesting in the literature, such as
QuantumVolume,GraphState, orIQP.
To allow easier use of these circuits as building blocks, we have introduced
a compose() method of
qiskit.circuit.QuantumCircuit for composition of circuits either
with other circuits (by welding them at the ends and optionally permuting
wires) or with other simpler gates:
>>> lhs.compose(rhs, qubits=[3, 2], inplace=True)
┌───┐ ┌─────┐ ┌───┐
lqr_1_0: ───┤ H ├─── rqr_0: ──■──┤ Tdg ├ lqr_1_0: ───┤ H ├───────────────
├───┤ ┌─┴─┐└─────┘ ├───┤
lqr_1_1: ───┤ X ├─── rqr_1: ┤ X ├─────── lqr_1_1: ───┤ X ├───────────────
┌──┴───┴──┐ └───┘ ┌──┴───┴──┐┌───┐
lqr_1_2: ┤ U1(0.1) ├ + = lqr_1_2: ┤ U1(0.1) ├┤ X ├───────
└─────────┘ └─────────┘└─┬─┘┌─────┐
lqr_2_0: ─────■───── lqr_2_0: ─────■───────■──┤ Tdg ├
┌─┴─┐ ┌─┴─┐ └─────┘
lqr_2_1: ───┤ X ├─── lqr_2_1: ───┤ X ├───────────────
└───┘ └───┘
lcr_0: 0 ═══════════ lcr_0: 0 ═══════════════════════
lcr_1: 0 ═══════════ lcr_1: 0 ═══════════════════════
With this, Qiskit's circuits no longer assume an implicit initial state of \(|0\rangle\), and will not be drawn with this initial state. The all-zero initial state is still assumed on a backend when a circuit is executed.
புதிய அம்சங்கள்¶
A new method,
has_entry(), has been added to theqiskit.circuit.EquivalenceLibraryclass to quickly check if a given gate has any known decompositions in the library.A new class
IQP, to construct an instantaneous quantum polynomial circuit, has been added to the circuit library moduleqiskit.circuit.library.A new
compose()method has been added toqiskit.circuit.QuantumCircuit. It allows composition of two quantum circuits without having to turn one into a gate or instruction. It also allows permutations of qubits/clbits at the point of composition, as well as optional inplace modification. It can also be used in place ofappend(), as it allows composing instructions and operators onto the circuit as well.qiskit.circuit.library.Diagonalcircuits have been added to the circuit library. These circuits implement diagonal quantum operators (consisting of non-zero elements only on the diagonal). They are more efficiently simulated by the Aer simulator than dense matrices.Add
from_label()method to theqiskit.quantum_info.Cliffordclass for initializing as the tensor product of single-qubit I, X, Y, Z, H, or S gates.Schedule transformer
qiskit.pulse.reschedule.compress_pulses()performs an optimization pass to reduce the usage of waveform memory in hardware by replacing multiple identical instances of a pulse in a pulse schedule with a single pulse. For example:from qiskit.pulse import reschedule schedules = [] for _ in range(2): schedule = Schedule() drive_channel = DriveChannel(0) schedule += Play(SamplePulse([0.0, 0.1]), drive_channel) schedule += Play(SamplePulse([0.0, 0.1]), drive_channel) schedules.append(schedule) compressed_schedules = reschedule.compress_pulses(schedules)
The
qiskit.transpiler.Layouthas a new methodreorder_bits()that is used to reorder a list of virtual qubits based on the layout object.Two new methods have been added to the
qiskit.providers.models.PulseBackendConfigurationfor interacting with channels.get_channel_qubits()to get a list of all qubits operated by the given channel andget_qubit_channel()to get a list of channels operating on the given qubit.
New
qiskit.extensions.HamiltonianGateandqiskit.circuit.QuantumCircuit.hamiltonian()methods are introduced, representing Hamiltonian evolution of the circuit wavefunction by a user-specified Hermitian Operator and evolution time. The evolution time can be aParameter, allowing the creation of parameterized UCCSD or QAOA-style circuits which compile toUnitaryGateobjects iftimeparameters are provided. The Unitary of aHamiltonianGatewith Hamiltonian OperatorHand time parametertis \(e^{-iHt}\).The circuit library module
qiskit.circuit.librarynow provides a new boolean logic AND circuit,qiskit.circuit.library.AND, and OR circuit,qiskit.circuit.library.OR, which implement the respective operations on a variable number of provided qubits.New fake backends are added under
qiskit.test.mock. These include mocked versions ofibmq_armonk,ibmq_essex,ibmq_london,ibmq_valencia,ibmq_cambridge,ibmq_paris,ibmq_rome, andibmq_athens. As with other fake backends, these include snapshots of calibration data (i.e.backend.defaults()) and error data (i.e.backend.properties()) taken from the real system, and can be used for local testing, compilation and simulation.The
last_update_dateparameter forBackendPropertiescan now also be passed in as adatetimeobject. Previously only a string in ISO8601 format was accepted.Adds
qiskit.quantum_info.Statevector.from_int()andqiskit.quantum_info.DensityMatrix.from_int()methods that allow constructing a computational basis state for specified system dimensions.The methods on the
qiskit.circuit.QuantumCircuitclass for adding gates (for exampleh()) which were previously added dynamically at run time to the class definition have been refactored to be statically defined methods of the class. This means that static analyzer (such as IDEs) can now read these methods.
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
A new package, python-dateutil, is now required and has been added to the requirements list. It is being used to parse datetime strings received from external providers in
BackendPropertiesobjects.The marshmallow schema classes in
qiskit.providers.modelshave been removed since they are no longer used by the BackendObjects.The output of the
to_dict()method for the classes inqiskit.providers.modelsis no longer in a format for direct JSON serialization. Depending on the content contained in instances of these class there may be numpy arrays and/or complex numbers in the fields of the dict. If you're JSON serializing the output of the to_dict methods you should ensure your JSON encoder can handle numpy arrays and complex numbers. This includes:qiskit.providers.models.Nduv.to_dict()qiskit.providers.models.Gate.to_dict()
தேய்மான குறிப்புகள்¶
The
qiskit.dagcircuit.DAGCircuit.compose()method now takes a list of qubits/clbits that specify the positional order of bits to compose onto. The dictionary-based method of mapping using theedge_mapargument is deprecated and will be removed in a future release.The
combine_into_edge_map()method for theqiskit.transpiler.Layoutclass has been deprecated and will be removed in a future release. Instead, the new methodreorder_bits()should be used to reorder a list of virtual qubits according to the layout object.Passing a
qiskit.pulse.ControlChannelobject in via the parameterchannelfor theqiskit.providers.models.PulseBackendConfigurationmethodcontrol()has been deprecated and will be removed in a future release. TheControlChannelobjects are now generated from the backend configurationchannelsattribute which has the information of all channels and the qubits they operate on. Now, the methodcontrol()is expected to take the parameterqubitsof the form(control_qubit, target_qubit)and typelistortuple, and returns a list of control channels.The
ANDandORmethods ofqiskit.circuit.QuantumCircuitare deprecated and will be removed in a future release. Instead you should use the circuit library boolean logic classesqiskit.circuit.library.ANDamdqiskit.circuit.library.ORand then append those objects to your class. For example:from qiskit import QuantumCircuit from qiskit.circuit.library import AND qc = QuantumCircuit(2) qc.h(0) qc.cx(0, 1) qc_and = AND(2) qc.compose(qc_and, inplace=True)
The
qiskit.extensions.standardmodule is deprecated and will be removed in a future release. The gate classes in that module have been moved toqiskit.circuit.library.standard_gates.
பிழை திருத்தங்கள்¶
The
qiskit.circuit.QuantumCircuitmethodsinverse(),mirror()methods, as well as theQuantumCircuit.datasetter would generate an invalid circuit when used on a parameterized circuit instance. This has been resolved and these methods should now work with a parameterized circuit. Fixes #4235Previously when creating a controlled version of a standard qiskit gate if a
ctrl_statewas specified a genericControlledGateobject would be returned whereas without it a standard qiskit controlled gate would be returned if it was defined. This PR allows standard qiskit controlled gates to understandctrl_state.Additionally, this PR fixes what might be considered a bug where setting the
ctrl_stateof an already controlled gate would assume the specified state applied to the full control width instead of the control qubits being added. For instance,:circ = QuantumCircuit(2) circ.h(0) circ.x(1) gate = circ.to_gate() cgate = gate.control(1) c3gate = cgate.control(2, ctrl_state=0)
would apply
ctrl_stateto all three control qubits instead of just the two control qubits being added.Fixed a bug in
random_clifford()that stopped it from sampling the full Clifford group. Fixes #4271வர்க்கம்: qiskit.circuit.Instruction முறை: மெத்:` qiskit.circuit.Instruction.is_parameterized` முறை இதற்கு முன்னர் `` அறிவுறுத்தல்`` எந்தவொரு `` அறிவுறுத்தலுக்கும்` : வகுப்பு: கிஸ்கிட். சுற்று. அளவுரு` அதன் `` அளவுருக்கள்`` வரிசையின் எந்த உறுப்புகளிலும், அந்த `` அளவுரு`` முழுமையாக பிணைக்கப்பட்டிருந்தாலும் கூட. இது சரி செய்யப்பட்டுள்ளது, இதனால் அறிவுறுத்தல் முழுமையாக பிணைக்கப்படும்போது `` .is_parameterized`` `` தவறானது``
qiskit.circuit.ParameterExpression.subs()had not correctly detected some cases where substituting parameters would result in a two distinctParametersobjects in an expression with the same name. This has been corrected so aCircuitErrorwill be raised in these cases.Improve performance of
qiskit.quantum_info.Statevectorandqiskit.quantum_info.DensityMatrixfor low-qubit circuit simulations by optimizing the class__init__methods. Fixes #4281The function :func:` qiskit.compiler.transpile ` now correctly handles when the parameter ` basis_ gates ` s set ` . இது வெளியீட்டில் எந்த வாயிலையும் அனுமதிக்கும், வெளியீட்டுச் சுற்றுச்சூழல் (transpilation) நடைமுறையில் சேர்க்கப்பட்ட வாயுக்கள் சேர்க்கும். இந்த அளபுருக்களைப் பயன்படுத்தி ஒப்பிடுகையில் சில ஆதாரமான விளைவுகளைக் கொண்டிருக்கலாம் என்று குறிக்கவும். சில மின்சார கடவுச்சொல் ` ` basis_ வாயு ` ` அமைக்கிறது. உதாரணமாக, :class: qiskit.transpiler.passes.Optimize1qGates ` only optimizes the chains the chains of u1, u2, and u3 gates and without ` basis_gates ` ` it is unable to unroll gates that otherwise could be optimized:
from qiskit import * q = QuantumRegister(1, name='q') circuit = QuantumCircuit(q) circuit.h(q[0]) circuit.u1(0.1, q[0]) circuit.u2(0.1, 0.2, q[0]) circuit.h(q[0]) circuit.u3(0.1, 0.2, 0.3, q[0]) result = transpile(circuit, basis_gates=None, optimization_level=3) result.draw()
┌───┐┌─────────────┐┌───┐┌─────────────────┐ q_0: ┤ H ├┤ U2(0.1,0.3) ├┤ H ├┤ U3(0.1,0.2,0.3) ├ └───┘└─────────────┘└───┘└─────────────────┘Fixes #3017
பிற குறிப்புகள்¶
The objects in
qiskit.providers.modelswhich were previously constructed using the marshmallow library have been refactored to not depend on marshmallow. This includes:NduvGate
These should be drop-in replacements without any noticeable change but specifics inherited from marshmallow may not work. Please file issues for any incompatibilities found.
Aer 0.5.1¶
No Change
Ignis 0.3.0¶
No Change
Aqua 0.7.0¶
முன்னுரை¶
The Qiskit Aqua 0.7.0 release introduces a lot of new functionality along
with an improved integration with qiskit.circuit.QuantumCircuit
objects. The central contributions are the Qiskit's optimization module,
a complete refactor on Operators, using circuits as native input for the
algorithms and removal of the declarative JSON API.
Optimization module¶
The qiskit.optimization` module now offers functionality for modeling
and solving quadratic programs. It provides various near-term quantum and
conventional algorithms, such as the MinimumEigenOptimizer
(covering e.g. VQE or QAOA) or CplexOptimizer, as well as
a set of converters to translate between different
problem representations, such as QuadraticProgramToQubo.
See the
changelog
for a list of the added features.
Operator flow¶
The operator logic provided in qiskit.aqua.operators` was completely
refactored and is now a full set of tools for constructing
physically-intuitive quantum computations. It contains state functions,
operators and measurements and internally relies on Terra's Operator
objects. Computing expectation values and evolutions was heavily simplified
and objects like the ExpectationFactory produce the suitable, most
efficient expectation algorithm based on the Operator input type.
See the changelog
for a overview of the added functionality.
Native circuits¶
Algorithms commonly use parameterized circuits as input, for example the
VQE, VQC or QSVM. Previously, these inputs had to be of type
VariationalForm or FeatureMap which were wrapping the circuit
object. Now circuits are natively supported in these algorithms, which
means any individually constructed QuantumCircuit can be passed to
these algorithms. In combination with the release of the circuit library
which offers a wide collection of circuit families, it is now easy to
construct elaborate circuits as algorithm input.
Declarative JSON API¶
The ability of running algorithms using dictionaries as parameters as well as using the Aqua interfaces GUI has been removed.
IBM Q Provider 0.7.0¶
புதிய அம்சங்கள்¶
A new exception,
qiskit.providers.ibmq.IBMQBackendJobLimitError, is now raised if a job could not be submitted because the limit on active jobs has been reached.qiskit.providers.ibmq.job.IBMQJobandqiskit.providers.ibmq.managed.ManagedJobSeteach has two new methodsupdate_nameandupdate_tags. They are used to change the name and tags of a job or a job set, respectively.செயல்பாடு: func: qiskit.compiler.transpile இப்போது` அடிப்படை_கேட்ஸ்` அளவுரு` எதுவுமில்லை` என அமைக்கப்பட்டால் சரியாகக் கையாளப்படுகிறது. இது டிரான்ஸ்பைலேஷன் செயல்முறையால் சேர்க்கப்பட்ட வாயில்கள் உட்பட, வெளியீடு அமைக்கப்பட்ட சுற்றில் எந்த வாயிலையும் அனுமதிக்கும். இந்த அளவுருவைப் பயன்படுத்துவது தேர்வுமுறை போது சில எதிர்பாராத விளைவுகளை ஏற்படுத்தக்கூடும் என்பதை நினைவில் கொள்க. சில டிரான்ஸ்பைலர் பாஸ்கள் `` அடிப்படை_கேட்ஸ்`` தொகுப்பைப் பொறுத்து இருக்கும். எ.கா.
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
The
qiskit.providers.ibmq.job.IBMQJobmethodscreation_dateandtime_per_stepnow return date time information as adatetimeobject in local time instead of UTC. Similarly, the parametersstart_datetimeandend_datetime, ofqiskit.providers.ibmq.IBMQBackendService.jobs()andqiskit.providers.ibmq.IBMQBackend.jobs()can now be specified in local time.The
qiskit.providers.ibmq.job.QueueInfo.format()method now uses a customdatetimeto string formatter, and the package arrow is no longer required and has been removed from the requirements list.
தேய்மான குறிப்புகள்¶
The
from_dict()andto_dict()methods ofqiskit.providers.ibmq.job.IBMQJobare deprecated and will be removed in the next release.
பிழை திருத்தங்கள்¶
Fixed an issue where
nest_asyncio.apply()may raise an exception if there is no asyncio loop due to threading.
Qiskit 0.18.3¶
Terra 0.13.0¶
No Change
Aer 0.5.1¶
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
Changes how transpilation passes are handled in the C++ Controller classes so that each pass must be explicitly called. This allows for greater customization on when each pass should be called, and with what parameters. In particular this enables setting different parameters for the gate fusion optimization pass depending on the QasmController simulation method.
Add
gate_length_unitskwarg toqiskit.providers.aer.noise.NoiseModel.from_device()for specifying customgate_lengthsin the device noise model function to handle unit conversions for internal code.Add Controlled-Y ("cy") gate to the Stabilizer simulator methods supported gateset.
For Aer's backend the jsonschema validation of input qobj objects from terra is now opt-in instead of being enabled by default. If you want to enable jsonschema validation of qobj set the
validatekwarg on theqiskit.providers.aer.QasmSimualtor.run()method for the backend object toTrue.
பிழை திருத்தங்கள்¶
Remove "extended_stabilizer" from the automatically selected simulation methods. This is needed as the extended stabilizer method is not exact and may give incorrect results for certain circuits unless the user knows how to optimize its configuration parameters.
The automatic method now only selects from "stabilizer", "density_matrix", and "statevector" methods. If a non-Clifford circuit that is too large for the statevector method is executed an exception will be raised suggesting you could try explicitly using the "extended_stabilizer" or "matrix_product_state" methods instead.
Fixes Controller classes so that the ReduceBarrier transpilation pass is applied first. This prevents barrier instructions from preventing truncation of unused qubits if the only instruction defined on them was a barrier.
Disables gate fusion for the matrix product state simulation method as this was causing issues with incorrect results being returned in some cases.
Fix error in gate time unit conversion for device noise model with thermal relaxation errors and gate errors. The error probability the depolarizing error was being calculated with gate time in microseconds, while for thermal relaxation it was being calculated in nanoseconds. This resulted in no depolarizing error being applied as the incorrect units would make the device seem to be coherence limited.
Fix bug in incorrect composition of QuantumErrors when the qubits of composed instructions differ.
Fix issue where the "diagonal" gate is checked to be unitary with too high a tolerance. This was causing diagonals generated from Numpy functions to often fail the test.
Fix remove-barrier circuit optimization pass to be applied before qubit trucation. This fixes an issue where barriers inserted by the Terra transpiler across otherwise inactive qubits would prevent them from being truncated.
Ignis 0.3.0¶
No Change
Aqua 0.6.6¶
No Change
IBM Q Provider 0.6.1¶
No Change
Qiskit 0.18.0¶
Terra 0.13.0¶
முன்னுரை¶
The 0.13.0 release includes many big changes. Some highlights for this release are:
For the transpiler we have switched the graph library used to build the
qiskit.dagcircuit.DAGCircuit class which is the underlying data
structure behind all operations to be based on
retworkx for greatly improved
performance. Circuit transpilation speed in the 0.13.0 release should
be significanlty faster than in previous releases.
There has been a significant simplification to the style in which Pulse
instructions are built. Now, Command s are deprecated and a unified
set of Instruction s are supported.
The qiskit.quantum_info module includes several new functions
for generating random operators (such as Cliffords and quantum channels)
and for computing the diamond norm of quantum channels; upgrades to the
Statevector and
DensityMatrix classes to support
computing measurement probabilities and sampling measurements; and several
new classes are based on the symplectic representation
of Pauli matrices. These new classes include Clifford operators
(Clifford), N-qubit matrices that are
sparse in the Pauli basis (SparsePauliOp),
lists of Pauli's (PauliTable),
and lists of stabilizers (StabilizerTable).
This release also has vastly improved documentation across Qiskit,
including improved documentation for the qiskit.circuit,
qiskit.pulse and qiskit.quantum_info modules.
Additionally, the naming of gate objects and
QuantumCircuit methods have been updated to be
more consistent. This has resulted in several classes and methods being
deprecated as things move to a more consistent naming scheme.
For full details on all the changes made in this release see the detailed release notes below.
புதிய அம்சங்கள்¶
Added a new circuit library module
qiskit.circuit.library. This will be a place for constructors of commonly used circuits that can be used as building blocks for larger circuits or applications.The
qiskit.providers.BaseJobclass has four new methods:These methods are used to check wheter a job is in a given job status.
Add ability to specify control conditioned on a qubit being in the ground state. The state of the control qubits is represented by an integer. For example:
from qiskit import QuantumCircuit from qiskit.extensions.standard import XGate qc = QuantumCircuit(4) cgate = XGate().control(3, ctrl_state=6) qc.append(cgate, [0, 1, 2, 3])
Creates a four qubit gate where the fourth qubit gets flipped if the first qubit is in the ground state and the second and third qubits are in the excited state. If
ctrl_stateisNone, the default, control is conditioned on all control qubits being excited.A new jupyter widget,
%circuit_library_infohas been added toqiskit.tools.jupyter. This widget is used for visualizing details about circuits built from the circuit library. For examplefrom qiskit.circuit.library import XOR import qiskit.tools.jupyter circuit = XOR(5, seed=42) %circuit_library_info circuit
A new kwarg option,
formatted, has been added toqiskit.circuit.QuantumCircuit.qasm(). When set toTruethe method will print a syntax highlighted version (using pygments) to stdout and returnNone(which differs from the normal behavior of returning the QASM code as a string).A new kwarg option,
filename, has been added toqiskit.circuit.QuantumCircuit.qasm(). When set to a path the method will write the QASM code to that file. It will then continue to output as normal.A new instruction
SetFrequencywhich allows users to change the frequency of thePulseChannel. This is done in the following way:from qiskit.pulse import Schedule from qiskit.pulse import SetFrequency sched = pulse.Schedule() sched += SetFrequency(5.5e9, DriveChannel(0))
In this example, the frequency of all pulses before the
SetFrequencycommand will be the default frequency and all pulses applied to drive channel zero after theSetFrequencycommand will be at 5.5 GHz. Users ofSetFrequencyshould keep in mind any hardware limitations.A new method,
assign_parameters()has been added to theqiskit.circuit.QuantumCircuitclass. This method accepts a parameter dictionary with both floats and Parameters objects in a single dictionary. In other words this new method allows you to bind floats, Parameters or both in a single dictionary.Also, by using the
inplacekwarg it can be specified you can optionally modify the original circuit in place. By default this is set toFalseand a copy of the original circuit will be returned from the method.A new method
num_nonlocal_gates()has been added to theqiskit.circuit.QuantumCircuitclass. This method will return the number of gates in a circuit that involve 2 or or more qubits. These gates are more costly in terms of time and error to implement.The
qiskit.circuit.QuantumCircuitmethodiso()for adding anIsometrygate to the circuit has a new alias. You can now callqiskit.circuit.QuantumCircuit.isometry()in addition to callingiso.A
descriptionattribute has been added to theCouplingMapclass for storing a short description for different coupling maps (e.g. full, grid, line, etc.).A new method
compose()has been added to theDAGCircuitclass for composing two circuits via their DAGs.dag_left.compose(dag_right, edge_map={right_qubit0: self.left_qubit1, right_qubit1: self.left_qubit4, right_clbit0: self.left_clbit1, right_clbit1: self.left_clbit0})
┌───┐ ┌─────┐┌─┐ lqr_1_0: ───┤ H ├─── rqr_0: ──■──┤ Tdg ├┤M├ ├───┤ ┌─┴─┐└─┬─┬─┘└╥┘ lqr_1_1: ───┤ X ├─── rqr_1: ┤ X ├──┤M├───╫─ ┌──┴───┴──┐ └───┘ └╥┘ ║ lqr_1_2: ┤ U1(0.1) ├ + rcr_0: ════════╬════╩═ = └─────────┘ ║ lqr_2_0: ─────■───── rcr_1: ════════╩══════ ┌─┴─┐ lqr_2_1: ───┤ X ├─── └───┘ lcr_0: ═══════════ lcr_1: ═══════════ ┌───┐ lqr_1_0: ───┤ H ├────────────────── ├───┤ ┌─────┐┌─┐ lqr_1_1: ───┤ X ├─────■──┤ Tdg ├┤M├ ┌──┴───┴──┐ │ └─────┘└╥┘ lqr_1_2: ┤ U1(0.1) ├──┼──────────╫─ └─────────┘ │ ║ lqr_2_0: ─────■───────┼──────────╫─ ┌─┴─┐ ┌─┴─┐ ┌─┐ ║ lqr_2_1: ───┤ X ├───┤ X ├──┤M├───╫─ └───┘ └───┘ └╥┘ ║ lcr_0: ═══════════════════╩════╬═ ║ lcr_1: ════════════════════════╩═The mock backends in
qiskit.test.mocknow have a functionalrun()method that will return results similar to the real devices. Ifqiskit-aeris installed a simulation will be run with a noise model built from the device snapshot in the fake backend. Otherwise,qiskit.providers.basicaer.QasmSimulatorPywill be used to run an ideal simulation. Additionally, if a pulse experiment is passed torunand qiskit-aer is installed thePulseSimulatorwill be used to simulate the pulse schedules.The
qiskit.result.Result()methodget_counts()will now return a list of all the counts available when there are multiple circuits in a job. This works whenget_counts()is called with no arguments.The main consideration for this feature was for drawing all the results from multiple circuits in the same histogram. For example it is now possible to do something like:
from qiskit import execute from qiskit import QuantumCircuit from qiskit.providers.basicaer import BasicAer from qiskit.visualization import plot_histogram sim = BasicAer.get_backend('qasm_simulator') qc = QuantumCircuit(2) qc.h(0) qc.cx(0, 1) qc.measure_all() result = execute([qc, qc, qc], sim).result() plot_histogram(result.get_counts())
A new kwarg,
initial_statehas been added to theqiskit.visualization.circuit_drawer()function and theQuantumCircuitmethoddraw(). When set toTruethe initial state will be included in circuit visualizations for all backends. For example:from qiskit import QuantumCircuit circuit = QuantumCircuit(2) circuit.measure_all() circuit.draw(output='mpl', initial_state=True)
It is now possible to insert a callable into a
qiskit.pulse.InstructionScheduleMapwhich returns a newqiskit.pulse.Schedulewhen it is called with parameters. For example:def test_func(x): sched = Schedule() sched += pulse_lib.constant(int(x), amp_test)(DriveChannel(0)) return sched inst_map = InstructionScheduleMap() inst_map.add('f', (0,), test_func) output_sched = inst_map.get('f', (0,), 10) assert output_sched.duration == 10
இரண்டு புதிய கேட் வகுப்புகள் ,: வகுப்பு: qiskit.extensions.iSwapGate மற்றும்: வகுப்பு:` qiskit.extensions.DCXGate`, அவற்றுடன்: வகுப்பு: ~ qiskit.circuit.QuantumCircuit முறைகள்: மெத்:` ~ qiskit.circuit .QuantumCircuit.iswap` மற்றும்: meth: ~ qiskit.circuit.QuantumCircuit.dcx நிலையான நீட்டிப்புகளில் சேர்க்கப்பட்டுள்ளன. உள்நாட்டில் ஒருவருக்கொருவர் சமமான இந்த வாயில்கள் குறிப்பிட்ட XY இடைவினைகளைச் செயல்படுத்த பயன்படுத்தப்படலாம். இந்த வாயில்களுக்கான சுருக்கமான உந்துதலை இங்கே காணலாம்
The
qiskit.providers.BaseJobclass now has a new methodwait_for_final_state()that polls for the job status until the job reaches a final state (such asDONEorERROR). This method also takes an optionalcallbackkwarg which takes a Python callable that will be called during each iteration of the poll loop.The
search_widthandsearch_depthattributes of theqiskit.transpiler.passes.LookaheadSwappass are now settable when initializing the pass. A larger search space can often lead to more optimized circuits, at the cost of longer run time.வகுப்பில் உள்ள வினாடிகளின் எண்ணிக்கை: ~ qiskit.providers.models.BackendConfiguration ஐ இப்போது சொத்து வழியாக அணுகலாம்: py: attr:` ~ qiskit.providers.models.BackendConfiguration.num_qubits`. இது முன்பு `` n_qubits`` பண்புக்கூறு வழியாக மட்டுமே அணுகக்கூடியது.
Two new methods,
angles()andangles_and_phase(), have been added to theqiskit.quantum_info.OneQubitEulerDecomposerclass. These methods will return the relevant parameters without validation, and calling theOneQubitEulerDecomposerobject will perform the full synthesis with validation.An
RRdecomposition basis has been added to theqiskit.quantum_info.OneQubitEulerDecomposerfor decomposing an arbitrary 2x2 unitary into a twoRGatecircuit.சுருக்கமான `` பேஸ் ஆபரேட்டர்`` வகுப்பின் துணைப்பிரிவுகளாக இருக்கும் பொருள்களுக்கு `` கர்க்ஸ்`` அமைக்கும் திறனைச் சேர்க்கிறது. பொருளை `` op (qargs) `` (`` op`` என்பது ஒரு ஆபரேட்டர் வகுப்பு) என்று அழைப்பதன் மூலம் இது செய்யப்படுகிறது, மேலும் அசல் பொருளின் ஆழமற்ற நகலை ஒரு qargs சொத்து தொகுப்புடன் திருப்பித் தரும். அத்தகைய பொருள்: மெத்: ~ qiskit.quantum_info.Operator.compose அல்லது: meth:` ~ qiskit.quantum_info.Operator.dot` முறைகளுடன் பயன்படுத்தப்படும்போது, `` குர்க்ஸ்` போது குவார்களுக்கான உள் மதிப்பு பயன்படுத்தப்படும். `முறை குவார்க் பயன்படுத்தப்படவில்லை. இது பைனரி ஆபரேட்டர்களைப் பயன்படுத்தி துணை அமைப்பு அமைப்பை அனுமதிக்கிறது, எடுத்துக்காட்டாக:
from qiskit.quantum_info import Operator init = Operator.from_label('III') x = Operator.from_label('X') h = Operator.from_label('H') init @ x([0]) @ h([1])
சேர்க்கிறது: வகுப்பு: qiskit.quantum_info.Clifford ஆபரேட்டர் வகுப்பு` குவாண்டம்_இன்ஃபோ` தொகுதிக்கு. இந்த ஆபரேட்டர் கிளிஃபோர்டு குழுவிலிருந்து ஒரு என்-க்விட் யூனிட்டரி ஆபரேட்டரின் திறமையான சிம்பலெக்டிக் பிரதிநிதித்துவம் ஆகும். இந்த வகுப்பில் ஒரு: மெத்: ~ qiskit.quantum_info.Clifford.to_circuit முறை ஒரு: வகுப்பில் தொகுக்கப்படுகிறது: கிளிஃபோர்டு வாயில்களின்` q qiskit.QuantumCircuit` குறைந்த எண்ணிக்கையிலான CX வாயில்கள் 3-குவிட் வரை. இது N> 3 குவிட்களுக்கான பொதுவான தொகுப்பையும் வழங்குகிறது, ஆனால் இந்த முறை இரண்டு-குவிட் வாயில்களின் எண்ணிக்கையில் உகந்ததல்ல.
Adds
qiskit.quantum_info.SparsePauliOpoperator class. This is an efficient representaiton of an N-qubit matrix that is sparse in the Pauli basis and uses aqiskit.quantum_info.PauliTableand vector of complex coefficients for its data structure.This class supports much of the same functionality of the
qiskit.quantum_info.Operatorclass soSparsePauliOpobjects can be tensored, composed, scalar multiplied, added and subtracted.Numpy arrays or
Operatorobjects can be converted to aSparsePauliOpusing the :class:`~qiskit.quantum_info.SparsePauliOp.from_operator method.SparsePauliOpcan be convered to a sparse csr_matrix or dense Numpy array using theto_matrixmethod, or to anOperatorobject using theto_operatormethod.A
SparsePauliOpcan be iterated over in terms of itsPauliTablecomponents and coefficients, its coefficients and Pauli string labels using thelabel_iter()method, and the (dense or sparse) matrix components using thematrix_iter()method.Add
qiskit.quantum_info.diamond_norm()function for computing the diamond norm (completely-bounded trace-norm) of a quantum channel. This can be used to compute the distance between two quantum channels usingdiamond_norm(chan1 - chan2).A new class
qiskit.quantum_info.PauliTablehas been added. This is an efficient symplectic representation of a list of N-qubit Pauli operators. Some features of this class are:PauliTableobjects may be composed, and tensored which will return aPauliTableobject with the combination of the operation (compose(),dot(),expand(),tensor()) between each element of the first table, with each element of the second table.Addition of two tables acts as list concatination of the terms in each table (
+).Pauli tables can be sorted by lexicographic (tensor product) order or by Pauli weights (
sort()).Duplicate elements can be counted and deleted (
unique()).The PauliTable may be iterated over in either its native symplectic boolean array representation, as Pauli string labels (
label_iter()), or as dense Numpy array or sparse CSR matrices (matrix_iter()).Checking commutation between elements of the Pauli table and another Pauli (
commutes()) or Pauli table (commutes_with_all())
கூடுதல் விவரங்களுக்கு: வகுப்பு: qiskit.quantum_info.PauliTable வகுப்பு API ஆவணங்களைக் காண்க.
சேர்க்கிறது: வகுப்பு: qiskit.quantum_info.StabilizerTable class. இது: வர்க்கம்: qiskit.quantum_info.PauliTable வகுப்பின் துணைப்பிரிவாகும், இதில் பவுலி அட்டவணை வரிசையுடன் பூலியன் கட்ட திசையன் அடங்கும். இது +1 அல்லது -1 குணகத்துடன் உண்மையான-பவுலி ஆபரேட்டர்களாக இருக்கும் நிலைப்படுத்தி ஆபரேட்டர்களின் பட்டியலைக் குறிக்கிறது. நிலைப்படுத்தி மெட்ரிக்குகள் உண்மையானவை என்பதால் `` "Y" `` லேபிள் மேட்ரிக்ஸ் `` [[0, 1], [-1, 0]] `` என வரையறுக்கப்படுகிறது. கூடுதல் தகவலுக்கு API ஆவணங்களைக் காண்க.
சேர்க்கிறது: func: qiskit.quantum_info.pauli_basis செயல்பாடு இது ஒரு N- குவிட் பவுலி அடிப்படையை ஒரு: வர்க்கமாக அளிக்கிறது:` qiskit.quantum_info.PauliTable` பொருள். இந்த அடிப்படையின் வரிசைமுறை நிலையான லெக்சோகிராஃபிக் (டென்சர் தயாரிப்பு) வரிசையால் அல்லது அடையாளமற்ற பவுலி சொற்களின் எண்ணிக்கையால் (எடை) இருக்கலாம்.
சேர்க்கிறது: வகுப்பு: qiskit.quantum_info.ScalarOp ஆபரேட்டர் வகுப்பு, இது ஒரு அடையாள ஆபரேட்டரின் அளவிடக்கூடிய பலவற்றைக் குறிக்கிறது. தன்னிச்சையான பரிமாண துணை அமைப்புகளில் ஒரு அடையாளத்தைத் தொடங்க இது பயன்படுத்தப்படலாம், மேலும் இது மறைமுகமாக மற்ற `` பேஸ் ஆபரேட்டர்`` துணைப்பிரிவுகளுக்கு மாற்றப்படும் (ஒரு: வகுப்பு: qiskit.quantum_info.Operator அல்லது: வகுப்பு:` qiskit.quantum_info.SuperOp `) அது அவர்களுடன் இயற்றப்படும்போது அல்லது சேர்க்கப்படும்போது.
எடுத்துக்காட்டு: அடையாளம் செய்பவர்
from qiskit.quantum_info import ScalarOp, Operator X = Operator.from_label('X') Z = Operator.from_label('Z') init = ScalarOp(2 ** 3) # 3-qubit identity op = init @ X([0]) @ Z([1]) @ X([2]) # Op XZX
புதிய முறை: . அனைத்து துணை அமைப்புகளின் ஒருங்கிணைந்த பரிமாணங்கள் அசல் ஆபரேட்டருக்கு சமமாக இருக்க வேண்டும் அல்லது விதிவிலக்கு எழுப்பப்படும்.
சேர்க்கிறது: func: ஒரு சீரற்றதை உருவாக்குவதற்கு qiskit.quantum_info.random_clifford: வகுப்பு:` qiskit.quantum_info.Clifford` Operator.
சேர்: func: நிலையான: வர்க்கத்துடன் ஒரு சீரற்ற குவாண்டம் சேனலை உருவாக்குவதற்கான qiskit.quantum_info.random_quantum_channel செயல்பாடு:: qiskit.quantum_info.Choi- தரவரிசை: வகுப்பில்: ~ qiskit.quantum_info.Stinespring பிரதிநிதித்துவம்.
சேர்: func: qiskit.quantum_info.random_hermitian ஒரு சீரற்ற ஹெர்மிடியன் உருவாக்க: வகுப்பு:` ~ qiskit.quantum_info.Operator`.
சேர்: func: ஒரு சீரற்றதை உருவாக்குவதற்கு qiskit.quantum_info.random_statevector: வகுப்பு:` ~ qiskit.quantum_info.Statevector`.
சேர்க்கிறது: func: ஒரு சீரற்றதை உருவாக்குவதற்கு qiskit.quantum_info.random_pauli_table: வகுப்பு:` qiskit.quantum_info.PauliTable.
சேர்க்கிறது: func: qiskit.quantum_info.random_stabilizer_table ஒரு சீரற்றதை உருவாக்குவதற்கு: வகுப்பு:` qiskit.quantum_info.StabilizerTable`.
வகுப்புக்கு `` num_qubits`` பண்புக்கூறு சேர்க்கவும்: qiskit.quantum_info.StateVector மற்றும்: class:` qiskit.quantum_info.DensityMatrix` வகுப்புகள். இது என்-குவிட் மாநிலங்களுக்கான குவிட்களின் எண்ணிக்கையைத் தருகிறது மற்றும் க்விட் அல்லாத மாநிலங்களுக்கு `` எதுவுமில்லை``.
சேர்க்கிறது: மெத்: ~ qiskit.quantum_info.Statevector.to_dict மற்றும்: மெத்:` ~ qiskit.quantum_info.DensityMatrix.to_dict` மாற்றுவதற்கான முறைகள்: வகுப்பு: qiskit.quantum_info.Statevector மற்றும்: class:` qiskit.quant. ப்ரான்-கெட் குறியீட்டு அகராதியில் டென்சிட்டிமேட்ரிக்ஸின் பொருள்கள்.
Example
from qiskit.quantum_info import Statevector state = Statevector.from_label('+0') print(state.to_dict())
{'00': (0.7071067811865475+0j), '10': (0.7071067811865475+0j)}from qiskit.quantum_info import DensityMatrix state = DensityMatrix.from_label('+0') print(state.to_dict())
{'00|00': (0.4999999999999999+0j), '10|00': (0.4999999999999999+0j), '00|10': (0.4999999999999999+0j), '10|10': (0.4999999999999999+0j)}சேர்க்கிறது: மெத்: ~ qiskit.quantum_info.Statevector.probilities மற்றும்: மெத்:` ~ qiskit.quantum_info.DensityMatrix.probables` to: class: qiskit.quantum_info.Statevector மற்றும்: class:` qiskit.quantum_in. குறிப்பிட்ட துணை அமைப்புகளுக்கான கணக்கீட்டு அடிப்படையில் அளவீட்டு விளைவு நிகழ்தகவுகளின் வரிசையை வழங்கும் வகுப்புகள்.
Example
from qiskit.quantum_info import Statevector state = Statevector.from_label('+0') print(state.probabilities())
[0.5 0. 0.5 0. ]
from qiskit.quantum_info import DensityMatrix state = DensityMatrix.from_label('+0') print(state.probabilities())
[0.5 0. 0.5 0. ]
சேர்க்கிறது: மெத்: ~ qiskit.quantum_info.Statevector.probilities மற்றும்: மெத்:` ~ qiskit.quantum_info.DensityMatrix.probables` to: class: qiskit.quantum_info.Statevector மற்றும்: class:` qiskit.quantum_in. குறிப்பிட்ட துணை அமைப்புகளுக்கான கணக்கீட்டு அடிப்படையில் அளவீட்டு விளைவு நிகழ்தகவுகளின் வரிசையை வழங்கும் வகுப்புகள்.
from qiskit.quantum_info import Statevector state = Statevector.from_label('+0') print(state.probabilities_dict())
{'00': 0.4999999999999999, '10': 0.4999999999999999}from qiskit.quantum_info import DensityMatrix state = DensityMatrix.from_label('+0') print(state.probabilities_dict())
{'00': 0.4999999999999999, '10': 0.4999999999999999}சேர்: மெத்: ~ qiskit.quantum_info.Statevector.sample_counts மற்றும்: மெத்:` ~ qiskit.quantum_info.Statevector.sample_memory` முறைகள்: வகுப்பிற்கு: ~ qiskit.quantum_info.Statevector மற்றும்: வகுப்பு:` ~ qisk. குவாண்டம்_இன்ஃபோ.டென்சிட்டி மேட்ரிக்ஸின் வகுப்புகள் துணை அமைப்புகளில் அளவீட்டு விளைவுகளை மாதிரிப்படுத்துகின்றன.
எடுத்துக்காட்டுகள்:
Generate a counts dictionary by sampling from a statevector
from qiskit.quantum_info import Statevector psi = Statevector.from_label('+0') shots = 1024 # Sample counts dictionary counts = psi.sample_counts(shots) print('Measure both:', counts) # Qubit-0 counts0 = psi.sample_counts(shots, [0]) print('Measure Qubit-0:', counts0) # Qubit-1 counts1 = psi.sample_counts(shots, [1]) print('Measure Qubit-1:', counts1)
Measure both: {'00': 534, '10': 490} Measure Qubit-0: {'0': 1024} Measure Qubit-1: {'0': 510, '1': 514}Return the array of measurement outcomes for each sample
from qiskit.quantum_info import Statevector psi = Statevector.from_label('-1') shots = 10 # Sample memory mem = psi.sample_memory(shots) print('Measure both:', mem) # Qubit-0 mem0 = psi.sample_memory(shots, [0]) print('Measure Qubit-0:', mem0) # Qubit-1 mem1 = psi.sample_memory(shots, [1]) print('Measure Qubit-1:', mem1)
Measure both: ['01' '01' '11' '11' '11' '01' '11' '01' '01' '01'] Measure Qubit-0: ['1' '1' '1' '1' '1' '1' '1' '1' '1' '1'] Measure Qubit-1: ['1' '0' '0' '0' '0' '0' '1' '0' '0' '1']
A :meth:` ~ qiskit.quantum_info.Statevector.मापन ` method to the :class:` qiskit.quantum_info.Statevector ` and :class:` qiskit.quantum_info.DensityMatrix ` quantum state classes. இது குறிப்பிட்ட துணைமுறைகளிலிருந்து ஒற்றை அளவிலான முடிவுகளைக் கொண்டு ஒரே அளவைக் கணக்கிட அனுமதிக்கிறது. எடுத்துக்காட்டாக
from qiskit.quantum_info import Statevector psi = Statevector.from_label('+1') # Measure both qubits outcome, psi_meas = psi.measure() print("measure([0, 1]) outcome:", outcome, "Post-measurement state:") print(psi_meas) # Measure qubit-1 only outcome, psi_meas = psi.measure([1]) print("measure([1]) outcome:", outcome, "Post-measurement state:") print(psi_meas)
measure([0, 1]) outcome: 01 Post-measurement state: Statevector([0.+0.j, 1.+0.j, 0.+0.j, 0.+0.j], dims=(2, 2)) measure([1]) outcome: 0 Post-measurement state: Statevector([-0.+0.j, 1.+0.j, -0.+0.j, 0.+0.j], dims=(2, 2))ஒரு: மெத்: ~ qiskit.quantum_info.Statevector.reset முறையை: வகுப்பில் சேர்க்கிறது:` qiskit.quantum_info.Statevector` மற்றும்: வகுப்பு: qiskit.quantum_info.DensityMatrix குவாண்டம் மாநில வகுப்புகள். இது சில அல்லது அனைத்து துணை அமைப்புகளையும்: கணித: | 0 ரேங்கிள் நிலைக்கு மீட்டமைக்க அனுமதிக்கிறது. உதாரணத்திற்கு.
from qiskit.quantum_info import Statevector psi = Statevector.from_label('+1') # Reset both qubits psi_reset = psi.reset() print("Post reset state: ") print(psi_reset) # Reset qubit-1 only psi_reset = psi.reset([1]) print("Post reset([1]) state: ") print(psi_reset)
Post reset state: Statevector([1.+0.j, 0.+0.j, 0.+0.j, 0.+0.j], dims=(2, 2)) Post reset([1]) state: Statevector([-0.+0.j, 1.+0.j, -0.+0.j, 0.+0.j], dims=(2, 2))ஒரு புதிய காட்சிப்படுத்தல் செயல்பாடு: func: ஒற்றை குயிட் கேட் மாற்றங்களைக் காட்சிப்படுத்த qiskit.visualization.visualize_transition சேர்க்கப்பட்டுள்ளது. இது ஒரு குவிட் சுற்றுக்கு எடுத்து, ஒரு ப்ளொச் கோளத்தில் குவிட் நிலை மாற்றங்களின் அனிமேஷனை வழங்குகிறது. இந்த செயல்பாட்டைப் பயன்படுத்த நீங்கள் உலகளவில் ஒரு மேட்லோட்லிப் அனிமேஷன் எழுத்தாளருக்கான சார்புகளை நிறுவி கட்டமைத்திருக்க வேண்டும். இது குறித்த கூடுதல் விவரங்களுக்கு matplotlib ஆவணங்கள் <https://matplotlib.org/api/animation_api.html#writer-classes> _ ஐப் பார்க்கவும். இருப்பினும், இயல்புநிலை வழக்கில் FFmpeg <https://www.ffmpeg.org/> _ நிறுவப்பட்டிருப்பதை உறுதிசெய்வது இந்த செயல்பாட்டைப் பயன்படுத்த போதுமானது.
இது பின்வரும் வாயில்களுடன் சேர்க்கையை ஆதரிக்கிறது:
HGateXGateYGateZGateRXGateRYGateRZGateSGateSdgGateTGateTdgGateU1Gate
உதாரணத்திற்கு:
from qiskit.visualization import visualize_transition from qiskit import * qc = QuantumCircuit(1) qc.h(0) qc.ry(70,0) qc.rx(90,0) qc.rz(120,0) visualize_transition(qc, fpg=20, spg=1, trace=True)
: func: ~ qiskit.execute.execute இல் ஒரு புதிய குவார்க் உள்ளது` அட்டவணை_சர்க்யூட்`. `` Schedule_circuit = True`` ஐ அமைப்பதன் மூலம் இது ஒரு: வகுப்பில் சுற்றுவட்டத்தை திட்டமிட உதவுகிறது: ~ qiskit.pulse.Schedule. இது பயனர்களை உருவாக்க அனுமதிக்கிறது: வகுப்பு: qiskit.circuit.QuantumCircuit பொருள்கள்` as_late_as_possible` மற்றும்` as_soon_as_possible` முறைகள் போன்ற தனிப்பயன் திட்டமிடல் முறைகளைப் பயன்படுத்த. உதாரணத்திற்கு:
job = execute(qc, backend, schedule_circuit=True, scheduling_method="as_late_as_possible")
ஒரு புதிய சூழல் மாறி `` QISKIT_SUPPRESS_PACKAGING_WARNINGS`` ஐ `` Y`` அல்லது `` y`` என அமைக்கலாம், இது `` கிஸ்கிட்-ஏர்`` மற்றும் `` கிஸ்கிட்-இப்மக்-வழங்குநர்`` நிறுவப்படவில்லை பற்றிய எச்சரிக்கைகளை அடக்கும். இறக்குமதி நேரத்தில். கிஸ்கிட்-டெர்ராவை மட்டுமே இயக்கும் பயனர்களுக்கு இது பயனுள்ளதாக இருக்கும் (அல்லது கிஸ்கிட்-ஏர் மற்றும் / அல்லது கிஸ்கிட்-இப்மக்-வழங்குநர் அல்ல) மற்றும் எச்சரிக்கைகள் சாத்தியமான பேக்கேஜிங் சிக்கலின் அறிகுறியாக இல்லை. பயனர் உள்ளமைவு கோப்பு அவற்றை முடக்க அமைக்கப்பட்டிருந்தாலும் எச்சரிக்கைகள் எப்போதும் இயக்கப்பட்டிருப்பதை உறுதிசெய்ய நீங்கள் சூழல் மாறியை `` N`` அல்லது `` n`` என அமைக்கலாம்.
புதிய பயனர் வடிவமைப்பு கோப்பு தேர்வு ` ` suppress_packaging_warnings ` ` சேர்க்கப்பட்டது. உங்கள் பயனர் வடிவமைப்பு கோப்பில் ` ` உண்மையான ` ` ` உண்மையில் அமைக்கும்போது:
[default] suppress_packaging_warnings = true
இது ` qiskit-aer ` ` மற்றும் ` qiskit-ibmq-வழங்குபவர் ` ` இறக்குமதி நேரத்தில் நிறுவப்படவில்லை. இது பயனர்கள் பயனர்களுக்கு மட்டுமே qiskit-terra (அல்லது qiskit-aer and/or qiskit-ibmq-வழங்குபவர்) மட்டுமே இயங்கும் பயனர்களுக்கு பயன்படுகிறது. பயனர் வடிவமைப்பு கோப்பு எச்சரிக்கை நீக்குவதற்கு அமைக்கப்பட்டால், ` ` QISKIT_ SUPPRESS_PACKAGING_WARNINGS" to "N" or "n"
:func:` qiskit.compiler.transpile () ` has two new kwargs, ` ` layout_method ` ` and ` routing_method ` `. இவை நீங்கள் ஒரு குறிப்பிட்ட முறையை தேர்ந்தெடுக்க அனுமதிக்கிறது. உதாரணமாக:
transpile(circ, backend, layout_method='dense', routing_method='lookahead')
will run
DenseLayoutlayout pass andLookaheadSwaprouting pass.There has been a significant simplification to the style in which Pulse instructions are built.
முந்தைய பாணியுடன், `` கட்டளை` கள் சேனல்களுடன் ஒரு: py: class: ~ qiskit.pulse.instructions.Instruction ஐ உருவாக்க அழைக்கப்பட்டன. கட்டளைகள் மற்றும் அறிவுறுத்தல்கள் இரண்டின் பயன்பாடு குழப்பமான ஒரு புள்ளியாக இருந்தது. இது முந்தைய பாணி:
sched += Delay(5)(DriveChannel(0)) sched += ShiftPhase(np.pi)(DriveChannel(0)) sched += SamplePulse([1.0, ...])(DriveChannel(0)) sched += Acquire(100)(AcquireChannel(0), MemorySlot(0))
or, equivalently (though less used):
sched += DelayInstruction(Delay(5), DriveChannel(0)) sched += ShiftPhaseInstruction(ShiftPhase(np.pi), DriveChannel(0)) sched += PulseInstruction(SamplePulse([1.0, ...]), DriveChannel(0)) sched += AcquireInstruction(Acquire(100), AcquireChannel(0), MemorySlot(0))
Now, rather than build a command and an instruction, each command has been migrated into an instruction:
sched += Delay(5, DriveChannel(0)) sched += ShiftPhase(np.pi, DriveChannel(0)) sched += Play(SamplePulse([1.0, ...]), DriveChannel(0)) sched += SetFrequency(5.5, DriveChannel(0)) # New instruction! sched += Acquire(100, AcquireChannel(0), MemorySlot(0))
இப்போது ஒரு: py: class: ~ qiskit.pulse.instructions.Play அறிவுறுத்தல் உள்ளது, இது ஒரு துடிப்பு உறை மற்றும் ஒரு சேனலின் விளக்கத்தை எடுக்கும். ஒரு புதிய: py: class: ~ qiskit.pulse.pulse_lib.Pulse class: mod:` ~ qiskit.pulse.pulse_lib` இல் இருந்து துடிப்பு உறை விளக்கம் துணைப்பிரிவாக இருக்க வேண்டும்.பல்ஸ்.
உதாரணத்திற்கு:
Play(SamplePulse([0.1]*10), DriveChannel(0)) Play(ConstantPulse(duration=10, amp=0.1), DriveChannel(0))
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
0.9.0 வெளியீட்டில் நீக்கப்பட்ட: வகுப்பு: qiskit.dagcircuit.DAGNode முறை` பாப்` அகற்றப்பட்டது. நீங்கள் இந்த முறையைப் பயன்படுத்துகிறீர்கள் என்றால், அதே பணியைச் செய்ய பைத்தானின் `` டெல்`` அறிக்கை அல்லது `` டெலட்ர் () `` செயல்பாட்டைப் பயன்படுத்தலாம்.
ஒரு புதிய விருப்பமான விசைவு தேவை, ` pygments <https://pygments.org/>` _, சேர்க்கப்பட்டுள்ளது. :meth:` qiskit.circuit.QuantumCircuit.qasm ` முறையின்படி (210-10-012 ` qiskit.circuit.QuantumCircuit.qasm) வழிவகுப்பில் OpenQASM 2.0 குறியீடு (OpenQASM) 2.0 குறியீட்டை வழங்குவதற்கு பயன்படுகிறது. இது நிறுவப்பட்டிருக்க வேண்டும் (` ` pip install pygments ` ` அல்லது ` pip install qiskit-terra[visualization]` ) முன் ` `%circuit_library_info ` ` widget in :mod: qiskit.tools.jupyter ` or the ` formatted ` ` kwarg on the :meth:` ~ qiskit.circuit.QuantumCircuit.qasm ` method.
துடிப்பு `` இடையக`` விருப்பம்: வர்க்கம்: qiskit.pulse.Channel மற்றும்: class:` qiskit.pulse.Schedule` டெர்ரா 0.11.0 இல் நீக்கப்பட்டது, இப்போது அகற்றப்பட்டது. சேனலில் அல்லது ஒரு அட்டவணையில் தாமதத்தைச் சேர்க்க, தாமதத்துடன் உங்கள் அட்டவணையில் அதை வெளிப்படையாகக் குறிப்பிடவும்:
sched = Schedule() sched += Delay(5)(DriveChannel(0))
டெர்ரா 0.11.0 இல் நீக்கப்பட்ட `` பல்ஸ் சேனல்ஸ்பெக்`` இப்போது அகற்றப்பட்டது. அதற்கு பதிலாக பின்தளத்தில் உள்ளமைவைப் பயன்படுத்தவும்:
config = backend.configuration() drive_chan_0 = config.drives(0) acq_chan_0 = config.acquires(0)
அல்லது, சரியாக வழி நேரடியாக, ` DriveChannel (index) ` `.
ஒரு இறக்குமதி பாதை டெரா 0.10.0 இல் விரிவாக்கப்பட்டது மற்றும் இப்போது நீக்கப்பட்டுள்ளது: ` ` PulseChannel ` `, ` ` DriveChannel ` ` ` ` ` ControlChannel ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `.
பாஸ் :class:` qiskit.transpiler.passes.CSPL வெளியீடு ` (இது 0.11.0 வெளியீட்டில் அறிமுகப்படுத்தப்பட்டது) முன்னேற்றக் கடல் மேலாளர் 2 மற்றும் 3 க்கு சேர்க்கப்பட்டுள்ளது. அளவு 2, 1,000 மற்றும் ஒரு நேரம் 10 நொடிகளின் ஒரு கால வரம்பு உள்ளது. அளவு 3, அழைப்பு வரம்பு 10,000 மற்றும் நேரம் 1 நிமிடம் ஆகும்.
முன்னமைக்கப்பட்ட பாஸ் மேலாளர்களில் பாஸ் இப்போது சேர்க்கப்பட்டுள்ளது பைதான்-கட்டுப்பாடு <https://pypi.org/project/python-constraint/> _ தொகுப்பு இனி விருப்ப சார்பு அல்ல, மேலும் தேவைகள் பட்டியலில் சேர்க்கப்பட்டுள்ளது.
ஒரு: வகுப்பு: qiskit.transpiler.PassManager க்கான ரன் நேர உள்ளமைவை அமைப்பதற்கு முன்னர் பயன்படுத்தப்பட்ட` டிரான்ஸ்பைல் கான்ஃபிக்` வகுப்பு நீக்கப்பட்டு அதற்கு பதிலாக ஒரு புதிய வகுப்பு: வகுப்பு:` qiskit.transpile.PassManagerConfig`. இந்த புதிய வகுப்பு ஒரு: வகுப்பை உருவாக்க தேவையான தகவல்களை மட்டுமே சேர்க்கும் வகையில் கட்டமைக்கப்பட்டுள்ளது: ~ qiskit.transpiler.PassManager. இந்த வகுப்பின் பண்புக்கூறுகள்:
initial_layoutbasis_gatescoupling_mapbackend_propertiesseed_transpiler
The function
transpile_circuitinqiskit.transpilerhas been removed. To transpile a circuit with a customPassManagernow you should use therun()method of the :class:~qiskit.transpiler.PassManager` object.வகுப்பு: ~ qiskit.circuit.QuantumCircuit முறை: மெத்:` ~ qiskit.circuit.QuantumCircuit.draw` மற்றும்: func: qiskit.visualization.circuit_drawer செயல்பாடு இனி இயல்புநிலையாக காட்சிப்படுத்தல்களில் சேர்க்கப்பட்ட ஆரம்ப நிலையை சேர்க்காது . வெளியீட்டு காட்சிப்படுத்தலில் ஆரம்ப நிலையை நீங்கள் தக்க வைத்துக் கொள்ள விரும்பினால், `` ஆரம்ப_நிலையம்`` குவார்க்கை `` உண்மை`` என அமைக்க வேண்டும். எடுத்துக்காட்டாக, இயங்கும்:
from qiskit import QuantumCircuit circuit = QuantumCircuit(2) circuit.measure_all() circuit.draw(output='text')
░ ┌─┐ q_0: ─░─┤M├─── ░ └╥┘┌─┐ q_1: ─░──╫─┤M├ ░ ║ └╥┘ meas: 2/════╩══╩═ 0 1This no longer includes the initial state. If you'd like to retain it you can run:
from qiskit import QuantumCircuit circuit = QuantumCircuit(2) circuit.measure_all() circuit.draw(output='text', initial_state=True)
░ ┌─┐ q_0: |0>─░─┤M├─── ░ └╥┘┌─┐ q_1: |0>─░──╫─┤M├ ░ ║ └╥┘ meas: 0 2/════╩══╩═ 0 1qiskit.compiler.transpile()(andqiskit.execute.execute(), which usestranspileinternally) will now raise an error when thepass_managerkwarg is set and a value is set for other kwargs that are already set in an instantiatedPassManagerobject. Previously, these conflicting kwargs would just be silently ignored and the values in thePassManagerinstance would be used. For example:from qiskit.circuit import QuantumCircuit from qiskit.transpiler.pass_manager_config import PassManagerConfig from qiskit.transpiler import preset_passmanagers from qiskit.compiler import transpile qc = QuantumCircuit(5) config = PassManagerConfig(basis_gates=['u3', 'cx']) pm = preset_passmanagers.level_0_pass_manager(config) transpile(qc, optimization_level=3, pass_manager=pm)
will now raise an error while prior to this release the value in
pmwould just silently be used and the value for theoptimization_levelkwarg would be ignored. Thetranspilekwargs this applies to are:optimization_levelbasis_gatescoupling_mapseed_transpilerbackend_propertiesinitial_layoutlayout_methodrouting_methodbackend
The
Operator,Clifford,SparsePauliOp,PauliTable,StabilizerTable, operator classes have an addedcallmethod that allows them to assign a qargs to the operator for use with thecompose(),dot(),evolve(),``+``, and-operations.The addition method of the
qiskit.quantum_info.Operator, class now accepts aqargkwarg to allow adding a smaller operator to a larger one assuming identities on the other subsystems (same as forqargsoncompose()anddot()methods). This allows subsystem addition using the call method as with composition. This support is added to all BaseOperator subclasses (ScalarOp,Operator,QuantumChannel).உதாரணத்திற்கு:
from qiskit.quantum_info import Operator, ScalarOp ZZ = Operator.from_label('ZZ') # Initialize empty Hamiltonian n_qubits = 10 ham = ScalarOp(2 ** n_qubits, coeff=0) # Add 2-body nearest neighbour terms for j in range(n_qubits - 1): ham = ham + ZZ([j, j+1])
The
BaseOperatorclass has been updated so that addition, subtraction and scalar multiplication are no longer abstract methods. This means that they are no longer required to be implemented in subclasses if they are not supported. The base class will raise aNotImplementedErrorwhen the methods are not defined.The
qiskit.quantum_info.random_density_matrix()function will now return a randomDensityMatrixobject. In previous releases it returned a numpy array.The
qiskit.quantum_info.Statevectorandqiskit.quantum_info.DensityMatrixclasses no longer copy the input array if it is already the correct dtype.fastjsonschema is added as a dependency. This is used for much faster validation of qobj dictionaries against the JSON schema when the
to_dict()method is called on qobj objects with thevalidatekeyword argument set toTrue.The qobj construction classes in
qiskit.qobjwill no longer validate against the qobj jsonschema by default. These include the following classes:If you were relying on this validation or would like to validate them against the qobj schema this can be done by setting the
validatekwarg toTrueonto_dict()method from either of the top level Qobj classesQasmQobjorPulseQobj. For example:which will validate the output dictionary against the Qobj jsonschema.
The output dictionary from
qiskit.qobj.QasmQobj.to_dict()andqiskit.qobj.PulseQobj.to_dict()is no longer in a format for direct json serialization as expected by IBMQ's API. These Qobj objects are the current format we use for passing experiments to providers/backends and while having a dictionary format that could just be passed to the IBMQ API directly was moderately useful forqiskit-ibmq-provider, it made things more difficult for other providers. Especially for providers that wrap local simulators. Moving forward the definitions of what is passed between providers and the IBMQ API request format will be further decoupled (in a backwards compatible manner) which should ease the burden of writing providers and backends.In practice, the only functional difference between the output of these methods now and previous releases is that complex numbers are represented with the
complextype and numpy arrays are not silently converted to list anymore. If you were previously callingjson.dumps()directly on the output ofto_dict()after this release a custom json encoder will be needed to handle these cases. For example:import json from qiskit.circuit import ParameterExpression from qiskit import qobj my_qasm = qobj.QasmQobj( qobj_id='12345', header=qobj.QobjHeader(), config=qobj.QasmQobjConfig(shots=1024, memory_slots=2, max_credits=10), experiments=[ qobj.QasmQobjExperiment(instructions=[ qobj.QasmQobjInstruction(name='u1', qubits=[1], params=[0.4]), qobj.QasmQobjInstruction(name='u2', qubits=[1], params=[0.4, 0.2]) ]) ] ) qasm_dict = my_qasm.to_dict() class QobjEncoder(json.JSONEncoder): """A json encoder for pulse qobj""" def default(self, obj): # Convert numpy arrays: if hasattr(obj, 'tolist'): return obj.tolist() # Use Qobj complex json format: if isinstance(obj, complex): return (obj.real, obj.imag) if isinstance(obj, ParameterExpression): return float(obj) return json.JSONEncoder.default(self, obj) json_str = json.dumps(qasm_dict, cls=QobjEncoder)
will generate a json string in the same exact manner that
json.dumps(my_qasm.to_dict())did in previous releases.CmdDefhas been deprecated since Terra 0.11.0 and has been removed. Please continue to useInstructionScheduleMapinstead.The methods
cmdsandcmd_qubitsinInstructionScheduleMaphave been deprecated since Terra 0.11.0 and have been removed. Please useinstructionsandqubits_with_instructioninstead.PulseDefaults have reported
qubit_freq_estandmeas_freq_estin Hz rather than GHz since Terra release 0.11.0. A warning which notified of this change has been removed.The previously deprecated (in the 0.11.0 release) support for passsing in
qiskit.circuit.Instructionparameters of typessympy.Basic,sympy.Expr,qiskit.qasm.node.node.Node(QASM AST node) andsympy.Matrixhas been removed. The supported types for instruction parameters are:intfloatcomplexstrlistnp.ndarray
The following properties of
BackendConfiguration:dtdtmrep_time
all have units of seconds. Prior to release 0.11.0,
dtanddtmhad units of nanoseconds. Prior to release 0.12.0,rep_timehad units of microseconds. The warnings alerting users of these changes have now been removed fromBackendConfiguration.A new requirement has been added to the requirements list, retworkx. It is an Apache 2.0 licensed graph library that has a similar API to networkx and is being used to significantly speed up the
qiskit.dagcircuit.DAGCircuitoperations as part of the transpiler. There are binaries published on PyPI for all the platforms supported by Qiskit Terra but if you're using a platform where there aren't precompiled binaries published refer to the retworkx documentation for instructions on pip installing from sdist.If you encounter any issues with the transpiler or DAGCircuit class as part of the transition you can switch back to the previous networkx implementation by setting the environment variable
USE_RETWORKXtoN. This option will be removed in the 0.14.0 release.
தேய்மான குறிப்புகள்¶
Passing in the data to the constructor for
qiskit.dagcircuit.DAGNodeas a dictionary argdata_dictis deprecated and will be removed in a future release. Instead you should now pass the fields in as kwargs to the constructor. For example the previous behavior of:from qiskit.dagcircuit import DAGNode data_dict = { 'type': 'in', 'name': 'q_0', } node = DAGNode(data_dict)
should now be:
from qiskit.dagcircuit import DAGNode node = DAGNode(type='in', name='q_0')
The naming of gate objects and methods have been updated to be more consistent. The following changes have been made:
The Pauli gates all have one uppercase letter only (
I,X,Y,Z)The parameterized Pauli gates (i.e. rotations) prepend the uppercase letter
R(RX,RY,RZ)A controlled version prepends the uppercase letter
C(CX,CRX,CCX)Gates are named according to their action, not their alternative names (
CCX, notToffoli)
The old names have been deprecated and will be removed in a future release. This is a list of the changes showing the old and new class, name attribute, and methods. If a new column is blank then there is no change for that.
Table 2 Gate Name Changes¶ Old Class
New Class
Old Name Attribute
New Name Attribute
Old
qiskit.circuit.QuantumCircuitmethodNew
qiskit.circuit.QuantumCircuitmethodToffoliGateCCXGateccxCrxGateCRXGatecrxCryGateCRYGatecryCrzGateCRZGatecrzFredkinGateCSwapGatecswapCu1GateCU1Gatecu1Cu3GateCU3Gatecu3CnotGateCXGatecxCyGateCYGatecyCzGateCZGateczDiagGateDiagonalGatediagdiagonaldiag_gateIdGateIGateididenIsometryisoisometryisometry()andiso()UCGUCGatemultiplexerucgUCRotUCPauliRotGateUCXUCRXGateucrotXucrxucxUCYUCRYGateucrotyucryucyUCZUCRZGateucrotzucrzuczThe kwarg
periodfor the functionsquare(),sawtooth(), andtriangle()inqiskit.pulse.pulse_libis now deprecated and will be removed in a future release. Instead you should now use thefreqkwarg to set the frequency.The
DAGCircuit.compose_back()andDAGCircuit.extend_back()methods are deprecated and will be removed in a future release. Instead you should use theqiskit.dagcircuit.DAGCircuit.compose()method, which is a more general and more flexible method that provides the same functionality.The
callbackkwarg of theqiskit.transpiler.PassManagerclass's constructor has been deprecated and will be removed in a future release. Instead of setting it at the object level during creation it should now be set as a kwarg parameter on theqiskit.transpiler.PassManager.run()method.The
n_qubitsandnumberofqubitskeywords are deprecated throughout Terra and replaced bynum_qubits. The old names will be removed in a future release. The objects affected by this change are listed below:Table 3 New Methods¶ வகுப்பு
Old Method
New Method
`` n_qubits
: வகுப்பு: `~ qiskit.quantum_info.Pauli
qubits இன் எண்ணிக்கை
Table 4 New arguments¶ செயல்கூறு
பழைய ஆர்குமென்ட்
புது ஆர்குமென்ட்
`` n_qubits
` ` num_qubits ` `
MSGaten_qubit` ` num_qubits ` `
The function
qiskit.quantum_info.synthesis.euler_angles_1qis now deprecated. It has been superseded by theqiskit.quantum_info.OneQubitEulerDecomposerclass which provides the same functionality through:OneQubitEulerDecomposer().angles(mat)
The
pass_managerkwarg for theqiskit.compiler.transpile()has been deprecated and will be removed in a future release. Moving forward the preferred way to transpile a circuit with a customPassManagerobject is to use therun()method of thePassManagerobject.The
qiskit.quantum_info.random_state()function has been deprecated and will be removed in a future release. Instead you should use theqiskit.quantum_info.random_statevector()function.The
add,subtract, andmultiplymethods of theqiskit.quantum_info.Statevectorandqiskit.quantum_info.DensityMatrixclasses are deprecated and will be removed in a future release. Instead you shoulde use+,-,*binary operators instead.Deprecates
qiskit.quantum_info.Statevector.to_counts(),qiskit.quantum_info.DensityMatrix.to_counts(), andqiskit.quantum_info.counts.state_to_counts(). These functions are superseded by the class methodsqiskit.quantum_info.Statevector.probabilities_dict()andqiskit.quantum_info.DensityMatrix.probabilities_dict().SamplePulseandParametricPulses (e.g.Gaussian) now subclass fromPulseand have been moved to theqiskit.pulse.pulse_lib. The previous path viapulse.commandsis deprecated and will be removed in a future release.DelayInstructionhas been deprecated and replaced byDelay. This new instruction has been taken over the previousCommandDelay. The migration pattern is:Delay(<duration>)(<channel>) -> Delay(<duration>, <channel>) DelayInstruction(Delay(<duration>), <channel>) -> Delay(<duration>, <channel>)
Until the deprecation period is over, the previous
Delaysyntax of calling a command on a channel will also be supported:Delay(<phase>)(<channel>)
The new
Delayinstruction does not support acommandattribute.FrameChangeandFrameChangeInstructionhave been deprecated and replaced byShiftPhase. The changes are:FrameChange(<phase>)(<channel>) -> ShiftPhase(<phase>, <channel>) FrameChangeInstruction(FrameChange(<phase>), <channel>) -> ShiftPhase(<phase>, <channel>)
Until the deprecation period is over, the previous FrameChange syntax of calling a command on a channel will be supported:
ShiftPhase(<phase>)(<channel>)
The
callmethod ofSamplePulseandParametricPulses have been deprecated. The migration is as follows:Pulse(<*args>)(<channel>) -> Play(Pulse(*args), <channel>)
AcquireInstructionhas been deprecated and replaced byAcquire. The changes are:Acquire(<duration>)(<**channels>) -> Acquire(<duration>, <**channels>) AcquireInstruction(Acquire(<duration>), <**channels>) -> Acquire(<duration>, <**channels>)
Until the deprecation period is over, the previous Acquire syntax of calling the command on a channel will be supported:
Acquire(<duration>)(<**channels>)
பிழை திருத்தங்கள்¶
The
BarrierBeforeFinalMeasurementstranspiler pass, included in the preset transpiler levels when targeting a physical device, previously inserted a barrier across only measured qubits. In some cases, this allowed the transpiler to insert a swap after a measure operation, rendering the circuit invalid for current devices. The pass has been updated so that the inserted barrier will span all qubits on the device. Fixes #3937When extending a
QuantumCircuitinstance (extendee) with another circuit (extension), the circuit is taken via reference. If a circuit is extended with itself that leads to an infinite loop as extendee and extension are the same. This bug has been resolved by copying the extension if it is the same object as the extendee. Fixes #3811Fixes a case in
qiskit.result.Result.get_counts(), where the results for an expirement could not be referenced if the experiment was initialized as a Schedule without a name. Fixes #2753Previously, replacing
Parameterobjects in a circuit with new Parameter objects prior to decomposing a circuit would result in the substituted values not correctly being substituted into the decomposed gates. This has been resolved such that binding and decomposition may occur in any order.The matplotlib output backend for the
qiskit.visualization.circuit_drawer()function andqiskit.circuit.QuantumCircuit.draw()method drawer has been fixed to renderCU1Gategates correctly. Fixes #3684A bug in
qiskit.circuit.QuantumCircuit.from_qasm_str()andqiskit.circuit.QuantumCircuit.from_qasm_file()when loading QASM with custom gates defined has been fixed. Now, loading this QASM:OPENQASM 2.0; include "qelib1.inc"; gate rinv q {sdg q; h q; sdg q; h q; } qreg q[1]; rinv q[0];
is equivalent to the following circuit:
rinv_q = QuantumRegister(1, name='q') rinv_gate = QuantumCircuit(rinv_q, name='rinv') rinv_gate.sdg(rinv_q) rinv_gate.h(rinv_q) rinv_gate.sdg(rinv_q) rinv_gate.h(rinv_q) rinv = rinv_gate.to_instruction() qr = QuantumRegister(1, name='q') expected = QuantumCircuit(qr, name='circuit') expected.append(rinv, [qr[0]])
Fixes #1566
Allow quantum circuit Instructions to have list parameter values. This is used in Aer for expectation value snapshot parameters for example
params = [[1.0, 'I'], [1.0, 'X']]]for \(\langle I + X\rangle\).Previously, for circuits containing composite gates (those created via
qiskit.circuit.QuantumCircuit.to_gate()orqiskit.circuit.QuantumCircuit.to_instruction()or their corresponding converters), attempting to bind the circuit more than once would result in only the first bind value being applied to all circuits when transpiled. This has been resolved so that the values provided for subsequent binds are correctly respected.
பிற குறிப்புகள்¶
The qasm and pulse qobj classes:
from
qiskit.qobjhave all been reimplemented without using the marsmallow library. These new implementations are designed to be drop-in replacement (except for as noted in the upgrade release notes) but specifics inherited from marshmallow may not work. Please file issues for any incompatibilities found.
Aer 0.5.0¶
Added¶
Add support for terra diagonal gate
Add support for parameterized qobj
Fixed¶
Added postfix for linux on Raspberry Pi
Handle numpy array inputs from qobj
Ignis 0.3.0¶
Added¶
API documentation
CNOT-Dihedral randomized benchmarking
Accreditation module for output accrediation of noisy devices
Pulse calibrations for single qubits
Pulse Discriminator
Entanglement verification circuits
Gateset tomography for single-qubit gate sets
Adds randomized benchmarking utility functions
calculate_1q_epg,calculate_2q_epgfunctions to calculate 1 and 2-qubit error per gate from error per CliffordAdds randomized benchmarking utility functions
calculate_1q_epc,calculate_2q_epcfor calculating 1 and 2-qubit error per Clifford from error per gate
Changed¶
Support integer labels for qubits in tomography
Support integer labels for measurement error mitigation
Deprecated¶
Deprecates
twoQ_clifford_errorfunction. Usecalculate_2q_epcinstead.Python 3.5 support in qiskit-ignis is deprecated. Support will be removed on the upstream python community's end of life date for the version, which is 09/13/2020.
Aqua 0.6.5¶
No Change
IBM Q Provider 0.6.0¶
No Change
Qiskit 0.17.0¶
Terra 0.12.0¶
No Change
Aer 0.4.1¶
No Change
Ignis 0.2.0¶
No Change
Aqua 0.6.5¶
No Change
IBM Q Provider 0.6.0¶
புதிய அம்சங்கள்¶
There are three new exceptions:
VisualizationError,VisualizationValueError, andVisualizationTypeError. These are now used in the visualization modules when an exception is raised.You can now set the logging level and specify a log file using the environment variables
QSIKIT_IBMQ_PROVIDER_LOG_LEVELandQISKIT_IBMQ_PROVIDER_LOG_FILE, respectively. Note that the name of the logger isqiskit.providers.ibmq.qiskit.providers.ibmq.job.IBMQJobnow has a new methodscheduling_mode()that returns the scheduling mode the job is in.IQX-related tutorials that used to be in
qiskit-iqx-tutorialsare now inqiskit-ibmq-provider.
Changed¶
qiskit.providers.ibmq.IBMQBackend.jobs()now accepts a new boolean parameterdescending, which can be used to indicate whether the jobs should be returned in descending or ascending order.qiskit.providers.ibmq.managed.IBMQJobManagernow looks at the job limit and waits for old jobs to finish before submitting new ones if the limit has been reached.qiskit.providers.ibmq.IBMQBackend.status()now raises aqiskit.providers.ibmq.IBMQBackendApiProtocolErrorexception if there was an issue with validating the status.
Qiskit 0.16.0¶
Terra 0.12.0¶
No Change
Aer 0.4.0¶
No Change
Ignis 0.2.0¶
No Change
Aqua 0.6.4¶
No Change
IBM Q Provider 0.5.0¶
புதிய அம்சங்கள்¶
Some of the visualization and Jupyter tools, including gate/error map and backend information, have been moved from
qiskit-terratoqiskit-ibmq-provider. They are now under theqiskit.providers.ibmq.jupyterandqiskit.providers.ibmq.visualization. In addition, you can now use%iqx_dashboardto get a dashboard that provides both job and backend information.
Changed¶
JSON schema validation is no longer run by default on Qobj objects passed to
qiskit.providers.ibmq.IBMQBackend.run(). This significantly speeds up the execution of the run() method. Qobj objects are still validated on the server side, and invalid Qobjs will continue to raise exceptions. To force local validation, setvalidate_qobj=Truewhen you invokerun().
Qiskit 0.15.0¶
Terra 0.12.0¶
முன்னுரை¶
The 0.12.0 release includes several new features and bug fixes. The biggest change for this release is the addition of support for parametric pulses to OpenPulse. These are Pulse commands which take parameters rather than sample points to describe a pulse. 0.12.0 is also the first release to include support for Python 3.8. It also marks the beginning of the deprecation for Python 3.5 support, which will be removed when the upstream community stops supporting it.
புதிய அம்சங்கள்¶
The pass
qiskit.transpiler.passes.CSPLayoutwas extended with two new parameters:call_limitandtime_limit. These options allow limiting how long the pass will run. The optioncall_limitlimits the number of times that the recursive function in the backtracking solver may be called. Similarly,time_limitlimits how long (in seconds) the solver will be allowed to run. The defaults are1000calls and10seconds respectively.qiskit.pulse.Acquirecan now be applied to a single qubit. This makes pulse programming more consistent and easier to reason about, as now all operations apply to a single channel. For example:acquire = Acquire(duration=10) schedule = Schedule() schedule.insert(60, acquire(AcquireChannel(0), MemorySlot(0), RegisterSlot(0))) schedule.insert(60, acquire(AcquireChannel(1), MemorySlot(1), RegisterSlot(1)))
A new method
qiskit.transpiler.CouplingMap.draw()was added toqiskit.transpiler.CouplingMapto generate a graphviz image from the coupling map graph. For example:from qiskit.transpiler import CouplingMap coupling_map = CouplingMap( [[0, 1], [1, 0], [1, 2], [1, 3], [2, 1], [3, 1], [3, 4], [4, 3]]) coupling_map.draw()
Parametric pulses have been added to OpenPulse. These are pulse commands which are parameterized and understood by the backend. Arbitrary pulse shapes are still supported by the SamplePulse Command. The new supported pulse classes are:
qiskit.pulse.ConstantPulse
They can be used like any other Pulse command. An example:
from qiskit.pulse import (Schedule, Gaussian, Drag, ConstantPulse, GaussianSquare) sched = Schedule(name='parametric_demo') sched += Gaussian(duration=25, sigma=4, amp=0.5j)(DriveChannel(0)) sched += Drag(duration=25, amp=0.1, sigma=5, beta=4)(DriveChannel(1)) sched += ConstantPulse(duration=25, amp=0.3+0.1j)(DriveChannel(1)) sched += GaussianSquare(duration=1500, amp=0.2, sigma=8, width=140)(MeasureChannel(0)) << sched.duration
The resulting schedule will be similar to a SamplePulse schedule built using
qiskit.pulse.pulse_lib, however, waveform sampling will be performed by the backend. The methodqiskit.pulse.Schedule.draw()can still be used as usual. However, the command will be converted to aSamplePulsewith theqiskit.pulse.ParametricPulse.get_sample_pulse()method, so the pulse shown may not sample the continuous function the same way that the backend will.This feature can be used to construct Pulse programs for any backend, but the pulses will be converted to
SamplePulseobjects if the backend does not support parametric pulses. Backends which support them will have the following new attribute:backend.configuration().parametric_pulses: List[str] # e.g. ['gaussian', 'drag', 'constant']
Note that the backend does not need to support all of the parametric pulses defined in Qiskit.
When the backend supports parametric pulses, and the Pulse schedule is built with them, the assembled Qobj is significantly smaller. The size of a PulseQobj built entirely with parametric pulses is dependent only on the number of instructions, whereas the size of a PulseQobj built otherwise will grow with the duration of the instructions (since every sample must be specified with a value).
Added utility functions,
qiskit.scheduler.measure()andqiskit.scheduler.measure_all()to qiskit.scheduler module. These functions return aqiskit.pulse.Scheduleobject which measures qubits using OpenPulse. For example:from qiskit.scheduler import measure, measure_all measure_q0_schedule = measure(qubits=[0], backend=backend) measure_all_schedule = measure_all(backend) measure_custom_schedule = measure(qubits=[0], inst_map=backend.defaults().instruction_schedule_map, meas_map=[[0]], qubit_mem_slots={0: 1})
Pulse
qiskit.pulse.Scheduleobjects now have better representations that for simple schedules should be valid Python expressions.The
qiskit.circuit.QuantumCircuitmethodsqiskit.circuit.QuantumCircuit.measure_active(),qiskit.circuit.QuantumCircuit.measure_all(), andqiskit.circuit.QuantumCircuit.remove_final_measurements()now have an addition kwarginplace. Wheninplaceis set toFalsethe function will return a modified copy of the circuit. This is different from the default behavior which will modify the circuit object in-place and return nothing.Several new constructor methods were added to the
qiskit.transpiler.CouplingMapclass for building objects with basic qubit coupling graphs. The new constructor methods are:For example, to use the new constructors to get a coupling map of 5 qubits connected in a linear chain you can now run:
from qiskit.transpiler import CouplingMap coupling_map = CouplingMap.from_line(5) coupling_map.draw()
Introduced a new pass
qiskit.transpiler.passes.CrosstalkAdaptiveSchedule. This pass aims to reduce the impact of crosstalk noise on a program. It uses crosstalk characterization data from the backend to schedule gates. When a pair of gates has high crosstalk, they get serialized using a barrier. Naive serialization is harmful because it incurs decoherence errors. Hence, this pass uses a SMT optimization approach to compute a schedule which minimizes the impact of crosstalk as well as decoherence errors.The pass takes as input a circuit which is already transpiled onto the backend i.e., the circuit is expressed in terms of physical qubits and swap gates have been inserted and decomposed into CNOTs if required. Using this circuit and crosstalk characterization data, a Z3 optimization is used to construct a new scheduled circuit as output.
To use the pass on a circuit circ:
dag = circuit_to_dag(circ) pass_ = CrosstalkAdaptiveSchedule(backend_prop, crosstalk_prop) scheduled_dag = pass_.run(dag) scheduled_circ = dag_to_circuit(scheduled_dag)
backend_propis aqiskit.providers.models.BackendPropertiesobject for the target backend.crosstalk_propis a dict which specifies conditional error rates. For two gatesg1andg2,crosstalk_prop[g1][g2]specifies the conditional error rate ofg1wheng1andg2are executed simultaneously. A method for generatingcrosstalk_propwill be added in a future release of qiskit-ignis. Until then you'll either have to already know the crosstalk properties of your device, or manually write your own device characterization experiments.In the preset pass manager for optimization level 1,
qiskit.transpiler.preset_passmanagers.level_1_pass_manager()ifqiskit.transpiler.passes.TrivialLayoutlayout pass is not a perfect match for a particular circuit, thenqiskit.transpiler.passes.DenseLayoutlayout pass is used instead.Added a new abstract method
qiskit.quantum_info.Operator.dot()to the abstractBaseOperatorclass, so it is included for all implementations of that abstract class, includingqiskit.quantum_info.OperatorandQuantumChannel(e.g.,qiskit.quantum_info.Choi) objects. This method returns the right operator multiplicationa.dot(b)\(= a \cdot b\). This is equivalent to calling the operatorqiskit.quantum_info.Operator.compose()method with the kwargfrontset toTrue.Added
qiskit.quantum_info.average_gate_fidelity()andqiskit.quantum_info.gate_error()functions to theqiskit.quantum_infomodule for working withqiskit.quantum_info.OperatorandQuantumChannel(e.g.,qiskit.quantum_info.Choi) objects.Added the
qiskit.quantum_info.partial_trace()function to theqiskit.quantum_infothat works withqiskit.quantum_info.Statevectorandqiskit.quantum_info.DensityMatrixquantum state classes. For example:from qiskit.quantum_info.states import Statevector from qiskit.quantum_info.states import DensityMatrix from qiskit.quantum_info.states import partial_trace psi = Statevector.from_label('10+') partial_trace(psi, [0, 1]) rho = DensityMatrix.from_label('10+') partial_trace(rho, [0, 1])
When
qiskit.circuit.QuantumCircuit.draw()orqiskit.visualization.circuit_drawer()is called with thewith_layoutkwarg set True (the default) the output visualization will now display the physical qubits as integers to clearly distinguish them from the virtual qubits.உதாரணத்திற்கு:
from qiskit import QuantumCircuit from qiskit import transpile from qiskit.test.mock import FakeVigo qc = QuantumCircuit(3) qc.h(0) qc.cx(0, 1) qc.cx(0, 2) transpiled_qc = transpile(qc, FakeVigo()) transpiled_qc.draw(output='mpl')
Added new state measure functions to the
qiskit.quantum_infomodule:qiskit.quantum_info.entropy(),qiskit.quantum_info.mutual_information(),qiskit.quantum_info.concurrence(), andqiskit.quantum_info.entanglement_of_formation(). These functions work with theqiskit.quantum_info.Statevectorandqiskit.quantum_info.DensityMatrixclasses.The decomposition methods for single-qubit gates in
qiskit.quantum_info.synthesis.one_qubit_decompose.OneQubitEulerDecomposerhave been expanded to now also include the'ZXZ'basis, characterized by three rotations about the Z,X,Z axis. This now means that a general 2x2 Operator can be decomposed into following bases:U3,U1X,ZYZ,ZXZ,XYX,ZXZ.
தெரிந்த சிக்கல்கள்¶
Running functions that use
qiskit.tools.parallel_map()(for exampleqiskit.execute.execute(),qiskit.compiler.transpile(), andqiskit.transpiler.PassManager.run()) may not work when called from a script running outside of aif __name__ == '__main__':block when using Python 3.8 on MacOS. Other environments are unaffected by this issue. This is due to changes in how parallel processes are launched by Python 3.8 on MacOS. IfRuntimeErrororAttributeErrorare raised by scripts that are directly callingparallel_map()or when calling a function that uses it internally with Python 3.8 on MacOS embedding the script calls insideif __name__ == '__main__':should workaround the issue. For example:from qiskit import QuantumCircuit, QiskitError from qiskit import execute, BasicAer qc1 = QuantumCircuit(2, 2) qc1.h(0) qc1.cx(0, 1) qc1.measure([0,1], [0,1]) # making another circuit: superpositions qc2 = QuantumCircuit(2, 2) qc2.h([0,1]) qc2.measure([0,1], [0,1]) execute([qc1, qc2], BasicAer.get_backend('qasm_simulator'))
:: க்கு மாற்றப்பட வேண்டும்:
from qiskit import QuantumCircuit, QiskitError from qiskit import execute, BasicAer def main(): qc1 = QuantumCircuit(2, 2) qc1.h(0) qc1.cx(0, 1) qc1.measure([0,1], [0,1]) # making another circuit: superpositions qc2 = QuantumCircuit(2, 2) qc2.h([0,1]) qc2.measure([0,1], [0,1]) execute([qc1, qc2], BasicAer.get_backend('qasm_simulator')) if __name__ == '__main__': main()
if errors are encountered with Python 3.8 on MacOS.
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
The value of the
rep_timeparameter for Pulse backend's configuration object is now in units of seconds, not microseconds. The first time aPulseBackendConfigurationobject is initialized it will raise a single warning to the user to indicate this.The
rep_timeargument forqiskit.compiler.assemble()now takes in a value in units of seconds, not microseconds. This was done to make the units with everything else in pulse. If you were passing in a value forrep_timeensure that you update the value to account for this change.The value of the
base_gateproperty ofqiskit.circuit.ControlledGateobjects has been changed from the class of the base gate to an instance of the class of the base gate.The
base_gate_nameproperty ofqiskit.circuit.ControlledGatehas been removed; you can get the name of the base gate by accessingbase_gate.nameon the object. For example:from qiskit import QuantumCircuit from qiskit.extensions import HGate qc = QuantumCircuit(3) cch_gate = HGate().control(2) base_gate_name = cch_gate.base_gate.name
Changed
qiskit.quantum_info.Operatormagic methods so that__mul__(which gets executed by python's multiplication operation, if the left hand side of the operation has it defined) implements right matrix multiplication (i.e.qiskit.quantum_info.Operator.dot()), and__rmul__(which gets executed by python's multiplication operation from the right hand side of the operation if the left does not have__mul__defined) implements scalar multiplication (i.e.qiskit.quantum_info.Operator.multiply()). Previously both methods implemented scalar multiplciation.The second argument of the
qiskit.quantum_info.process_fidelity()function,target, is now optional. If a target unitary is not specified, then process fidelity of the input channel with the identity operator will be returned.qiskit.compiler.assemble()will now respect the configuredmax_shotsvalue for a backend. If a value for theshotskwarg is specified that exceed the max shots set in the backend configuration the function will now raise aQiskitErrorexception. Additionally, if no shots argument is provided the default value is either 1024 (the previous behavior) ormax_shotsfrom the backend, whichever is lower.
தேய்மான குறிப்புகள்¶
Methods for adding gates to a
qiskit.circuit.QuantumCircuitwith abbreviated keyword arguments (e.g.ctl,tgt) have had their keyword arguments renamed to be more descriptive (e.g.control_qubit,target_qubit). The old names have been deprecated. A table including the old and new calling signatures for theQuantumCircuitmethods is included below.Table 5 New signatures for QuantumCircuitgate methods¶Instruction Type
Former Signature
New Signature
qiskit.extensions.HGateqc.h(q)qc.h(qubit)qiskit.extensions.CHGateqc.ch(ctl, tgt)qc.ch((control_qubit, target_qubit))qiskit.extensions.IdGateqc.iden(q)qc.iden(qubit)qiskit.extensions.RGateqc.iden(q)qc.iden(qubit)qiskit.extensions.RGateqc.r(theta, phi, q)qc.r(theta, phi, qubit)qiskit.extensions.RXGateqc.rx(theta, q)qc.rx(theta, qubit)qiskit.extensions.CrxGateqc.crx(theta, ctl, tgt)qc.crx(theta, control_qubit, target_qubit)qiskit.extensions.RYGateqc.ry(theta, q)qc.ry(theta, qubit)qiskit.extensions.CryGateqc.cry(theta, ctl, tgt)qc.cry(theta, control_qubit, target_qubit)qiskit.extensions.RZGateqc.rz(phi, q)qc.rz(phi, qubit)qiskit.extensions.CrzGateqc.crz(theta, ctl, tgt)qc.crz(theta, control_qubit, target_qubit)qiskit.extensions.SGateqc.s(q)qc.s(qubit)qiskit.extensions.SdgGateqc.sdg(q)qc.sdg(qubit)qiskit.extensions.FredkinGateqc.cswap(ctl, tgt1, tgt2)qc.cswap(control_qubit, target_qubit1, target_qubit2)qiskit.extensions.TGateqc.t(q)qc.t(qubit)qiskit.extensions.TdgGateqc.tdg(q)qc.tdg(qubit)qiskit.extensions.U1Gateqc.u1(theta, q)qc.u1(theta, qubit)qiskit.extensions.Cu1Gateqc.cu1(theta, ctl, tgt)qc.cu1(theta, control_qubit, target_qubit)qiskit.extensions.U2Gateqc.u2(phi, lam, q)qc.u2(phi, lam, qubit)qiskit.extensions.U3Gateqc.u3(theta, phi, lam, q)qc.u3(theta, phi, lam, qubit)qiskit.extensions.Cu3Gateqc.cu3(theta, phi, lam, ctl, tgt)qc.cu3(theta, phi, lam, control_qubit, target_qubit)qiskit.extensions.XGateqc.x(q)qc.x(qubit)qiskit.extensions.CnotGateqc.cx(ctl, tgt)qc.cx(control_qubit, target_qubit)qiskit.extensions.ToffoliGateqc.ccx(ctl1, ctl2, tgt)qc.ccx(control_qubit1, control_qubit2, target_qubit)qiskit.extensions.YGateqc.y(q)qc.y(qubit)qiskit.extensions.CyGateqc.cy(ctl, tgt)qc.cy(control_qubit, target_qubit)qiskit.extensions.ZGateqc.z(q)qc.z(qubit)qiskit.extensions.CzGateqc.cz(ctl, tgt)qc.cz(control_qubit, target_qubit)Running
qiskit.pulse.Acquireon multiple qubits has been deprecated and will be removed in a future release. Additionally, theqiskit.pulse.AcquireInstructionparametersmem_slotsandreg_slotshave been deprecated. Insteadreg_slotandmem_slotshould be used instead.The attribute of the
qiskit.providers.models.PulseDefaultsclasscircuit_instruction_maphas been deprecated and will be removed in a future release. Instead you should use the new attributeinstruction_schedule_map. This was done to match the type of the value of the attribute, which is anInstructionScheduleMap.The
qiskit.pulse.PersistentValuecommand is deprecated and will be removed in a future release. Similar functionality can be achieved with theqiskit.pulse.ConstantPulsecommand (one of the new parametric pulses). Compare the following:from qiskit.pulse import Schedule, PersistentValue, ConstantPulse, \ DriveChannel # deprecated implementation sched_w_pv = Schedule() sched_w_pv += PersistentValue(value=0.5)(DriveChannel(0)) sched_w_pv += PersistentValue(value=0)(DriveChannel(0)) << 10 # preferred implementation sched_w_const = Schedule() sched_w_const += ConstantPulse(duration=10, amp=0.5)(DriveChannel(0))
Python 3.5 support in qiskit-terra is deprecated. Support will be removed in the first release after the upstream Python community's end of life date for the version, which is 09/13/2020.
The
require_cptpkwarg of theqiskit.quantum_info.process_fidelity()function has been deprecated and will be removed in a future release. It is superseded by two separate kwargsrequire_cpandrequire_tp.Setting the
scaleparameter forqiskit.circuit.QuantumCircuit.draw()andqiskit.visualization.circuit_drawer()as the first positional argument is deprecated and will be removed in a future release. Instead you should usescaleas keyword argument.The
qiskit.tools.qi.qimodule is deprecated and will be removed in a future release. The legacy functions in the module have all been superseded by functions and classes in theqiskit.quantum_infomodule. A table of the deprecated functions and their replacement are below:Table 6 qiskit.tools.qi.qireplacements¶Deprecated
Replacement
qiskit.tools.partial_trace()qiskit.tools.choi_to_pauli()qiskit.quantum_info.Choiandquantum_info.PTMqiskit.tools.chop()numpy.roundqiskit.tools.qi.qi.outernumpy.outerqiskit.tools.concurrence()qiskit.tools.shannon_entropy()qiskit.tools.entropy()qiskit.tools.mutual_information()qiskit.tools.entanglement_of_formation()qiskit.tools.is_pos_def()quantum_info.operators.predicates.is_positive_semidefinite_matrixThe
qiskit.quantum_info.states.statesmodule is deprecated and will be removed in a future release. The legacy functions in the module have all been superseded by functions and classes in theqiskit.quantum_infomodule.Table 7 qiskit.quantum_info.states.statesreplacements¶Deprecated
Replacement
qiskit.quantum_info.states.states.basis_stateqiskit.quantum_info.states.states.projectorThe
scalingparameter of thedraw()method for theScheduleandPulseobjects was deprecated and will be removed in a future release. Instead the newscaleparameter should be used. This was done to have a consistent argument between pulse and circuit drawings. For example:#The consistency in parameters is seen below #For circuits circuit = QuantumCircuit() circuit.draw(scale=0.2) #For pulses pulse = SamplePulse() pulse.draw(scale=0.2) #For schedules schedule = Schedule() schedule.draw(scale=0.2)
பிழை திருத்தங்கள்¶
Previously, calling
qiskit.circuit.QuantumCircuit.bind_parameters()prior to decomposing a circuit would result in the bound values not being correctly substituted into the decomposed gates. This has been resolved such that binding and decomposition may occur in any order. Fixes issue #2482 and issue #3509The
Collect2qBlockspass had previously not considered classical conditions when determining whether to include a gate within an existing block. In some cases, this resulted in classical conditions being lost when transpiling withoptimization_level=3. This has been resolved so that classically conditioned gates are never included in a block. Fixes issue #3215All the output types for the circuit drawers in
qiskit.circuit.QuantumCircuit.draw()andqiskit.visualization.circuit_drawer()have fixed and/or improved support for drawing controlled custom gates. Fixes issue #3546, issue #3763, and issue #3764Explanation and examples have been added to documentation for the
qiskit.circuit.QuantumCircuitmethods for adding gates:qiskit.circuit.QuantumCircuit.ccx(),qiskit.circuit.QuantumCircuit.ch(),qiskit.circuit.QuantumCircuit.crz(),qiskit.circuit.QuantumCircuit.cswap(),qiskit.circuit.QuantumCircuit.cu1(),qiskit.circuit.QuantumCircuit.cu3(),qiskit.circuit.QuantumCircuit.cx(),qiskit.circuit.QuantumCircuit.cy(),qiskit.circuit.QuantumCircuit.cz(),qiskit.circuit.QuantumCircuit.h(),qiskit.circuit.QuantumCircuit.iden(),qiskit.circuit.QuantumCircuit.rx(),qiskit.circuit.QuantumCircuit.ry(),qiskit.circuit.QuantumCircuit.rz(),qiskit.circuit.QuantumCircuit.s(),qiskit.circuit.QuantumCircuit.sdg(),qiskit.circuit.QuantumCircuit.swap(),qiskit.circuit.QuantumCircuit.t(),qiskit.circuit.QuantumCircuit.tdg(),qiskit.circuit.QuantumCircuit.u1(),qiskit.circuit.QuantumCircuit.u2(),qiskit.circuit.QuantumCircuit.u3(),qiskit.circuit.QuantumCircuit.x(),qiskit.circuit.QuantumCircuit.y(),qiskit.circuit.QuantumCircuit.z(). Fixes issue #3400Fixes for handling of complex number parameter in circuit visualization. Fixes issue #3640
பிற குறிப்புகள்¶
The transpiler passes in the
qiskit.transpiler.passesdirectory have been organized into subdirectories to better categorize them by functionality. They are still all accessible under theqiskit.transpiler.passesnamespace.
Aer 0.4.0¶
Added¶
Added
NoiseModel.from_backendfor building a basic device noise model for an IBMQ backend (#569)Added multi-GPU enabled simulation methods to the
QasmSimulator,StatevectorSimulator, andUnitarySimulator. The qasm simulator has gpu version of the density matrix and statevector methods and can be accessed using"method": "density_matrix_gpu"or"method": "statevector_gpu"inbackend_options. The statevector simulator gpu method can be accessed using"method": "statevector_gpu". The unitary simulator GPU method can be accessed using"method": "unitary_gpu". These backends use CUDA and require an NVidia GPU.(#544)Added
PulseSimulatorbackend (#542)Added
PulseSystemModelandHamiltonianModelclasses to represent models to be used inPulseSimulator(#496, #493)Added
duffing_model_generatorsto generatePulseSystemModelobjects from a list of parameters (#516)Migrated ODE function solver to C++ (#442, #350)
Added high level pulse simulator tests (#379)
CMake BLAS_LIB_PATH flag to set path to look for BLAS lib (#543)
Changed¶
Changed the structure of the
srcdirectory to organise simulator source code. Simulator controller headers were moved tosrc/controllersand simulator method State headers are insrc/simulators(#544)Moved the location of several functions (#568): * Moved contents of
qiskit.provider.aer.noise.errorsinto theqiskit.providers.noisemodule * Moved contents ofqiskit.provider.aer.noise.utilsinto theqiskit.provider.aer.utilsmodule.Enabled optimization to aggregate consecutive gates in a circuit (fusion) by default (#579).
Deprecated¶
Deprecated
utils.qobj_utilsfunctions (#568)Deprecated
qiskit.providers.aer.noise.device.basic_device_noise_model. It is superseded by theNoiseModel.from_backendmethod (#569)
Removed¶
Removed
NoiseModel.as_dict,QuantumError.as_dict,ReadoutError.as_dict, andQuantumError.kronmethods that were deprecated in 0.3 (#568).
Ignis 0.2¶
No Change
Aqua 0.6¶
No Change
IBM Q Provider 0.4.6¶
Added¶
Several new methods were added to
IBMQBackend:wait_for_final_state()blocks until the job finishes. It takes a callback function that it will invoke after every query to provide feedback.active_jobs()returns the jobs submitted to a backend that are currently in an unfinished status.job_limit()returns the job limit for a backend.remaining_jobs_count()returns the number of jobs that you can submit to the backend before job limit is reached.
QueueInfonow has a newformat()method that returns a formatted string of the queue information.IBMQJobnow has three new methods:done(),running(), andcancelled()that are used to indicate job status.qiskit.providers.ibmq.ibmqbackend.IBMQBackend.run()now accepts an optional job_tags parameter. If specified, the job_tags are assigned to the job, which can later be used as a filter inqiskit.providers.ibmq.ibmqbackend.IBMQBackend.jobs().IBMQJobManagernow has a new methodretrieve_job_set()that allows you to retrieve a previously submitted job set using the job set ID.
Changed¶
The
Exceptionhierarchy has been refined with more specialized classes. You can, however, continue to catch their parent exceptions (such asIBMQAccountError). Also, the exception classIBMQApiUrlErrorhas been replaced byIBMQAccountCredentialsInvalidUrlandIBMQAccountCredentialsInvalidToken.
Deprecated¶
The use of proxy urls without a protocol (e.g.
http://) is deprecated due to recent Python changes.
Qiskit 0.14.0¶
Terra 0.11.0¶
முன்னுரை¶
The 0.11.0 release includes several new features and bug fixes. The biggest
change for this release is the addition of the pulse scheduler. This allows
users to define their quantum program as a QuantumCircuit and then map it
to the underlying pulse instructions that will control the quantum hardware to
implement the circuit.
புதிய அம்சங்கள்¶
Added 5 new commands to easily retrieve user-specific data from
BackendProperties:gate_property,gate_error,gate_length,qubit_property,t1,t2,readout_errorandfrequency. They return the specific values of backend properties. For example:from qiskit.test.mock import FakeOurense backend = FakeOurense() properties = backend.properties() gate_property = properties.gate_property('u1') gate_error = properties.gate_error('u1', 0) gate_length = properties.gate_length('u1', 0) qubit_0_property = properties.qubit_property(0) t1_time_0 = properties.t1(0) t2_time_0 = properties.t2(0) readout_error_0 = properties.readout_error(0) frequency_0 = properties.frequency(0)
Added method
Instruction.is_parameterized()to check if an instruction object is parameterized. This method returnsTrueif and only if instruction has aParameterExpressionorParameterobject for one of its params.Added a new analysis pass
Layout2qDistance. This pass allows to "score" a layout selection, onceproperty_set['layout']is set. The score will be the sum of distances for each two-qubit gate in the circuit, when they are not directly connected. This scoring does not consider direction in the coupling map. The lower the number, the better the layout selection is.For example, consider a linear coupling map
[0]--[2]--[1]and the following circuit:qr = QuantumRegister(2, 'qr') circuit = QuantumCircuit(qr) circuit.cx(qr[0], qr[1])
If the layout is
{qr[0]:0, qr[1]:1},Layout2qDistancewill setproperty_set['layout_score'] = 1. If the layout is{qr[0]:0, qr[1]:2}, then the result isproperty_set['layout_score'] = 0. The lower the score, the better.Added
qiskit.QuantumCircuit.cnotas an alias for thecxmethod ofQuantumCircuit. The namescnotandcxare often used interchangeably now the cx method can be called with either name.Added
qiskit.QuantumCircuit.toffolias an alias for theccxmethod ofQuantumCircuit. The namestoffoliandccxare often used interchangeably now the ccx method can be called with either name.Added
qiskit.QuantumCircuit.fredkinas an alias for thecswapmethod ofQuantumCircuit. The namesfredkinandcswapare often used interchangeably now the cswap method can be called with either name.The
latexoutput mode forqiskit.visualization.circuit_drawer()and theqiskit.circuit.QuantumCircuit.draw()method now has a mode to passthrough raw latex from gate labels and parameters. The syntax for doing this mirrors matplotlib's mathtext mode syntax. Any portion of a label string between a pair of '$' characters will be treated as raw latex and passed directly into the generated output latex. This can be leveraged to add more advanced formatting to circuit diagrams generated with the latex drawer.Prior to this release all gate labels were run through a utf8 -> latex conversion to make sure that the output latex would compile the string as expected. This is still what happens for all portions of a label outside the '$' pair. Also if you want to use a dollar sign in your label make sure you escape it in the label string (ie
'\$').You can mix and match this passthrough with the utf8 -> latex conversion to create the exact label you want, for example:
from qiskit import circuit circ = circuit.QuantumCircuit(2) circ.h([0, 1]) circ.append(circuit.Gate(name='α_gate', num_qubits=1, params=[0]), [0]) circ.append(circuit.Gate(name='α_gate$_2$', num_qubits=1, params=[0]), [1]) circ.append(circuit.Gate(name='\$α\$_gate', num_qubits=1, params=[0]), [1]) circ.draw(output='latex')
will now render the first custom gate's label as
α_gate, the second will beα_gatewith a 2 subscript, and the last custom gate's label will be$α$_gate.Add
ControlledGateclass for representing controlled gates. Controlled gate instances are created with thecontrol(n)method ofGateobjects wherenrepresents the number of controls. The control qubits come before the controlled qubits in the new gate. For example:from qiskit import QuantumCircuit from qiskit.extensions import HGate hgate = HGate() circ = QuantumCircuit(4) circ.append(hgate.control(3), [0, 1, 2, 3]) print(circ)
generates:
q_0: |0>──■── │ q_1: |0>──■── │ q_2: |0>──■── ┌─┴─┐ q_3: |0>┤ H ├ └───┘Allowed values of
meas_levelparameters and fields can now be a member from the IntEnum classqiskit.qobj.utils.MeasLevel. This can be used when callingexecute(or anywhere elsemeas_levelis specified) with a pulse experiment. For example:from qiskit import QuantumCircuit, transpile, schedule, execute from qiskit.test.mock import FakeOpenPulse2Q from qiskit.qobj.utils import MeasLevel, MeasReturnType backend = FakeOpenPulse2Q() qc = QuantumCircuit(2, 2) qc.h(0) qc.cx(0,1) qc_transpiled = transpile(qc, backend) sched = schedule(qc_transpiled, backend) execute(sched, backend, meas_level=MeasLevel.CLASSIFIED)
In this above example,
meas_level=MeasLevel.CLASSIFIEDandmeas_level=2can be used interchangably now.A new layout selector based on constraint solving is included. CSPLayout models the problem of finding a layout as a constraint problem and uses recursive backtracking to solve it.
cmap16 = CouplingMap(FakeRueschlikon().configuration().coupling_map) qr = QuantumRegister(5, 'q') circuit = QuantumCircuit(qr) circuit.cx(qr[0], qr[1]) circuit.cx(qr[0], qr[2]) circuit.cx(qr[0], qr[3]) pm = PassManager(CSPLayout(cmap16)) circuit_after = pm.run(circuit) print(pm.property_set['layout'])
Layout({ 1: Qubit(QuantumRegister(5, 'q'), 1), 2: Qubit(QuantumRegister(5, 'q'), 0), 3: Qubit(QuantumRegister(5, 'q'), 3), 4: Qubit(QuantumRegister(5, 'q'), 4), 15: Qubit(QuantumRegister(5, 'q'), 2) })
The parameter
CSPLayout(...,strict_direction=True)is more restrictive but it will guarantee there is no need of runningCXDirectionafter.pm = PassManager(CSPLayout(cmap16, strict_direction=True)) circuit_after = pm.run(circuit) print(pm.property_set['layout'])
Layout({ 8: Qubit(QuantumRegister(5, 'q'), 4), 11: Qubit(QuantumRegister(5, 'q'), 3), 5: Qubit(QuantumRegister(5, 'q'), 1), 6: Qubit(QuantumRegister(5, 'q'), 0), 7: Qubit(QuantumRegister(5, 'q'), 2) })
If the constraint system is not solvable, the layout property is not set.
circuit.cx(qr[0], qr[4]) pm = PassManager(CSPLayout(cmap16)) circuit_after = pm.run(circuit) print(pm.property_set['layout'])
NonePulseBackendConfiguration (accessed normally as backend.configuration()) has been extended with useful methods to explore its data and the functionality that exists in PulseChannelSpec. PulseChannelSpec will be deprecated in the future. For example:
backend = provider.get_backend(backend_name) config = backend.configuration() q0_drive = config.drive(0) # or, DriveChannel(0) q0_meas = config.measure(0) # MeasureChannel(0) q0_acquire = config.acquire(0) # AcquireChannel(0) config.hamiltonian # Returns a dictionary with hamiltonian info config.sample_rate() # New method which returns 1 / dt
PulseDefaults(accessed normally asbackend.defaults()) has an attribute,circuit_instruction_mapwhich has the methods of CmdDef. The new circuit_instruction_map is anInstructionScheduleMapobject with three new functions beyond what CmdDef had:qubit_instructions(qubits) returns the operations defined for the qubits
assert_has(instruction, qubits) raises an error if the op isn't defined
remove(instruction, qubits) like pop, but doesn't require parameters
There are some differences from the CmdDef:
__init__takes no argumentscmdsandcmd_qubitsare deprecated and replaced withinstructionsandqubits_with_instruction
Example:
backend = provider.get_backend(backend_name) inst_map = backend.defaults().circuit_instruction_map qubit = inst_map.qubits_with_instruction('u3')[0] x_gate = inst_map.get('u3', qubit, P0=np.pi, P1=0, P2=np.pi) pulse_schedule = x_gate(DriveChannel(qubit))
A new kwarg parameter,
show_framechange_channelsto optionally disable displaying channels with only framechange instructions in pulse visualizations was added to theqiskit.visualization.pulse_drawer()function andqiskit.pulse.Schedule.draw()method. When this new kwarg is set toFalsethe output pulse schedule visualization will not include any channels that only include frame changes.உதாரணத்திற்கு:
from qiskit.pulse import * from qiskit.pulse import library as pulse_lib gp0 = pulse_lib.gaussian(duration=20, amp=1.0, sigma=1.0) sched = Schedule() channel_a = DriveChannel(0) channel_b = DriveChannel(1) sched += Play(gp0, channel_a) sched = sched.insert(60, ShiftPhase(-1.57, channel_a)) sched = sched.insert(30, ShiftPhase(-1.50, channel_b)) sched = sched.insert(70, ShiftPhase(1.50, channel_b)) sched.draw(show_framechange_channels=False)
A new utility function
qiskit.result.marginal_counts()is added which allows marginalization of the counts over some indices of interest. This is useful when more qubits are measured than needed, and one wishes to get the observation counts for some subset of them only.When
passmanager.run(...)is invoked with more than one circuit, the transpilation of these circuits will run in parallel.PassManagers can now be sliced to create a new PassManager containing a subset of passes using the square bracket operator. This allow running or drawing a portion of the PassManager for easier testing and visualization. For example let's try to draw the first 3 passes of a PassManager pm, or run just the second pass on our circuit:
pm[0:4].draw() circuit2 = pm[1].run(circuit)
Also now, PassManagers can be created by adding two PassManagers or by directly adding a pass/list of passes to a PassManager.
pm = pm1[0] + pm2[1:3] pm += [setLayout, unroller]
A basic
schedulermodule has now been added to Qiskit. The scheduler schedules an input transpiledQuantumCircuitinto a pulseSchedule. The scheduler accepts as input aScheduleand either a pulseBackend, or aCmdDefwhich relates circuitInstructionobjects on specific qubits to pulse Schedules and ameas_mapwhich determines which measurements must occur together.Scheduling example:
from qiskit import QuantumCircuit, transpile, schedule from qiskit.test.mock import FakeOpenPulse2Q backend = FakeOpenPulse2Q() qc = QuantumCircuit(2, 2) qc.h(0) qc.cx(0,1) qc_transpiled = transpile(qc, backend) schedule(qc_transpiled, backend)
The scheduler currently supports two scheduling policies, as_late_as_possible (
alap) and as_soon_as_possible (asap), which respectively schedule pulse instructions to occur as late as possible or as soon as possible across qubits in a circuit. The scheduling policy may be selected with the input argumentmethod, for example:schedule(qc_transpiled, backend, method='alap')
It is easy to use a pulse
Schedulewithin aQuantumCircuitby mapping it to a custom circuit instruction such as a gate which may be used in aQuantumCircuit. To do this, first, define the custom gate and then add an entry into theCmdDeffor the gate, for each qubit that the gate will be applied to. The gate can then be used in theQuantumCircuit. At scheduling time the gate will be mapped to the underlying pulse schedule. Using this technique allows easy integration with preexisting qiskit modules such as Ignis.உதாரணத்திற்கு:
from qiskit import pulse, circuit, schedule from qiskit.pulse import pulse_lib custom_cmd_def = pulse.CmdDef() # create custom gate custom_gate = circuit.Gate(name='custom_gate', num_qubits=1, params=[]) # define schedule for custom gate custom_schedule = pulse.Schedule() custom_schedule += pulse_lib.gaussian(20, 1.0, 10)(pulse.DriveChannel) # add schedule to custom gate with same name custom_cmd_def.add('custom_gate', (0,), custom_schedule) # use custom gate in a circuit custom_qc = circuit.QuantumCircuit(1) custom_qc.append(custom_gate, qargs=[0]) # schedule the custom gate schedule(custom_qc, cmd_def=custom_cmd_def, meas_map=[[0]])
தெரிந்த சிக்கல்கள்¶
The feature for transpiling in parallel when
passmanager.run(...)is invoked with more than one circuit is not supported under Windows. See #2988 for more details.
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
The
qiskit.pulse.channels.SystemTopologyclass was used as a helper class forPulseChannelSpec. It has been removed since with the deprecation ofPulseChannelSpecand changes toBackendConfigurationmake it unnecessary.The previously deprecated representation of qubits and classical bits as tuple, which was deprecated in the 0.9 release, has been removed. The use of
QubitandClbitobjects is the new way to represent qubits and classical bits.The previously deprecated representation of the basis set as single string has been removed. A list of strings is the new preferred way.
The method
BaseModel.as_dict, which was deprecated in the 0.9 release, has been removed in favor of the methodBaseModel.to_dict.In PulseDefaults (accessed normally as backend.defaults()),
qubit_freq_estandmeas_freq_estare now returned in Hz rather than GHz. This means the new return values are 1e9 * their previous value.dill was added as a requirement. This is needed to enable running
passmanager.run()in parallel for more than one circuit.The previously deprecated gate
UBase, which was deprecated in the 0.9 release, has been removed. The gateU3Gateshould be used instead.The previously deprecated gate
CXBase, which was deprecated in the 0.9 release, has been removed. The gateCnotGateshould be used instead.The instruction
snapshotused to implicitly convert thelabelparameter to string. That conversion has been removed and an error is raised if a string is not provided.The previously deprecated gate
U0Gate, which was deprecated in the 0.9 release, has been removed. The gateIdGateshould be used instead to insert delays.
தேய்மான குறிப்புகள்¶
The
qiskit.pulse.CmdDefclass has been deprecated. Instead you should use theqiskit.pulse.InstructionScheduleMap. TheInstructionScheduleMapobject for a pulse enabled system can be accessed atbackend.defaults().instruction_schedules.PulseChannelSpecis being deprecated. UseBackendConfigurationinstead. The backend configuration is accessed normally asbackend.configuration(). The config has been extended with most of the functionality of PulseChannelSpec, with some modifications as follows, where 0 is an exemplary qubit index:pulse_spec.drives[0] -> config.drive(0) pulse_spec.measures[0] -> config.measure(0) pulse_spec.acquires[0] -> config.acquire(0) pulse_spec.controls[0] -> config.control(0)
Now, if there is an attempt to get a channel for a qubit which does not exist for the device, a
BackendConfigurationErrorwill be raised with a helpful explanation.The methods
memoryslotsandregisterslotsof the PulseChannelSpec have not been migrated to the backend configuration. These classical resources are not restrained by the physical configuration of a backend system. Please instantiate them directly:pulse_spec.memoryslots[0] -> MemorySlot(0) pulse_spec.registerslots[0] -> RegisterSlot(0)
The
qubitsmethod is not migrated to backend configuration. The result ofqubitscan be built as such:[q for q in range(backend.configuration().n_qubits)]
Qubitwithinpulse.channelshas been deprecated. They should not be used. It is possible to obtain channel <=> qubit mappings through the BackendConfiguration (or backend.configuration()).The function
qiskit.visualization.circuit_drawer.qx_color_scheme()has been deprecated. This function is no longer used internally and doesn't reflect the current IBM QX style. If you were using this function to generate a style dict locally you must save the output from it and use that dictionary directly.The Exception
TranspilerAccessErrorhas been deprecated. An alternative functionTranspilerErrorcan be used instead to provide the same functionality. This alternative function provides the exact same functionality but with greater generality.Buffers in Pulse are deprecated. If a nonzero buffer is supplied, a warning will be issued with a reminder to use a Delay instead. Other options would include adding samples to a pulse instruction which are (0.+0.j) or setting the start time of the next pulse to
schedule.duration + buffer.Passing in
sympy.Basic,sympy.Exprandsympy.Matrixtypes as instruction parameters are deprecated and will be removed in a future release. You'll need to convert the input to one of the supported types which are:intfloatcomplexstrnp.ndarray
பிழை திருத்தங்கள்¶
The Collect2qBlocks and CommutationAnalysis passes in the transpiler had been unable to process circuits containing Parameterized gates, preventing Parameterized circuits from being transpiled at optimization_level 2 or above. These passes have been corrected to treat Parameterized gates as opaque.
The align_measures function had an issue where Measure stimulus pulses weren't properly aligned with Acquire pulses, resulting in an error. This has been fixed.
Uses of
numpy.random.seedhave been removed so that calls of qiskit functions do not affect results of future calls tonumpy.randomFixed race condition occurring in the job monitor when
job.queue_position()returnsNone.Noneis a valid return fromjob.queue_position().Backend support for
memory=Truenow checked when that kwarg is passed.QiskitErrorresults if not supported.When transpiling without a coupling map, there were no check in the amount of qubits of the circuit to transpile. Now the transpile process checks that the backend has enough qubits to allocate the circuit.
பிற குறிப்புகள்¶
The
qiskit.result.marginal_counts()function replaces a similar utility function in qiskit-ignisqiskit.ignis.verification.tomography.marginal_counts(), which will be deprecated in a future qiskit-ignis release.All sympy parameter output type support have been been removed (or deprecated as noted) from qiskit-terra. This includes sympy type parameters in
QuantumCircuitobjects, qasm ast nodes, orQobjobjects.
Aer 0.3¶
No Change
Ignis 0.2¶
No Change
Aqua 0.6¶
No Change
IBM Q Provider 0.4¶
முன்னுரை¶
0.4.0 விடுதலை முதல் வெளியீடு என்று புதிய IBM Q API இன் அனைத்து அம்சங்களையும் பயன்படுத்துகிறது. குறிப்பாக, ` ` IBMQJob ` ` வகுப்பு, IBM Q லிருந்து அதிக தகவல்களை மீட்க முடியும், மற்றும் ஒரு பணி மேலாளர் வகுப்பு, பெரிய அல்லது சிக்கலான பணிகளின் அதிக அளவு பயன்பாடு அனுமதிக்கிறது. IBM Q அனுபவம் அல்லது QConsole இன்னும் வரலாற்றில் இருந்து மேம்படுத்தப்படவில்லை என்றால், தயவு செய்து IBM Q வழங்குபவர் 0.3 (Qiskit 0.11) விடுதலை குறிப்பிடுவதற்கு மேலும் விவரங்களுக்கு எப்படி மாற்றம் செய்ய வேண்டும். வரலாறு கணக்குகள் இப்பொழுது இந்த விடுதலை ஆதரிக்கப்படாது.
புதிய அம்சங்கள்¶
மாற்றங்களை அனுமதி¶
` ` IBMQJob ` ` வகுப்பு திருத்தப்பட்டுள்ளது, மேலும் இப்போது புதிய அம்சங்களுடன் ஒரு தொலைதூர வேலைகளின் உள்ளடக்கங்களை மேலும் நெருக்கமாக கொண்டு வருகின்றது:
ஒரு வேலையைச் சமர்ப்பிக்கும் போது `` IBMQBackend.run (..., job_name = '...') `` என்பதைக் குறிப்பிடுவதன் மூலம் நீங்கள் இப்போது ஒரு வேலைக்கு ஒரு பெயரை ஒதுக்கலாம். இந்த பெயரை `` IBMQJob.name () `` வழியாக மீட்டெடுக்கலாம் மற்றும் வடிகட்டலுக்குப் பயன்படுத்தலாம்.
வேலையை ஒழுங்குபடுத்தும்போது, வேறுபடி ` job_शेयर_level ` ` அளபுருக்கள் மூலம் வேறுபடும் அளவிலான (உலகளாவிய, ஒவ்வொன்றும், குழு அல்லது திட்டம்) போன்றவற்றோடு இப்போது பிற பயனர்களுடன் பகிர்ந்து கொள்ளலாம்.
` ` IBMQJob ` ` instances now have more attributes, reflecting the contents of the remote IBM Q பணிகள். இது IBM Q API மூலம் அறிமுகப்படுத்தப்பட்ட புதிய குணங்கள் தானாகவே மற்றும் உடனடியாக பயன்படுத்த கிடைக்கும் (உதாரணமாக, ``job.new_api_attribute ` `). புதிய குணங்கள் அவை நிலையாக கருதப்படும் போது முறைகளுக்கு பரிந்துரைக்கப்படும் (உதாரணமாக, ``job.name () ` `).
`. Error_ message () ` ` மேலும் தகவல்களை தரும் ஏன் ஒரு வேலை தோல்வியுற்றது.
` `.queue_position () ` ` ` ` refresh ` ` அளபுருவை ஏற்றுக்கொள்ளும் ஒரு புதுப்பிக்கப்படுகிறது.
` `.result () ` ` ` ` ` ` பகுதி ` ` அளபுருக்கான அளபுருக்கள் ஏற்றுக்கொள்ளும், முழுமையான முடிவுகளையும் திரும்ப ஏற்றுக்கொள்ளும், எந்த வேலைகளில் தோல்வியுற்றது. ` ` get_counts () ` ` ` ` Result ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` முடிவுகளுக்கு ஒரு விதிமுறையை உயர்த்தியுள்ளது.
தயவு செய்து மாற்றங்கள் வகுப்பின் சில குறைந்த அளவு மாற்றங்களை உள்ளடக்குகிறது என்று குறிப்பிடுக. நீங்கள் எந்த நிகழ்வுகளையும் கைமுறையாக உருவாக்கினால், குறிப்பு:
கட்டமைப்பின் கையொப்பம் புதிய அம்சங்களுக்காக கணக்கிடப்பட்டுள்ளது.
. சமர்ப்பித்தல் () ` முறையை இனி நேரடியாக அழைக்க முடியாது, மேலும் ஒத்திசைவான `` IBMQBackend.run () `` வழியாக அல்லது வேலை மேலாளர் வழியாக வேலைகள் சமர்ப்பிக்கப்படும் என்று எதிர்பார்க்கப்படுகிறது.
பணி மேலாளர்¶
ஒரு புதிய பணி மேலாளர் (` ` IBMQJobManager ` `) அறிமுகப்படுத்தப்பட்டு, பல சுற்றுச்சூழல் அல்லது பழுப்பு திட்டங்களைக் கொண்டிருக்கும் பணிகளை கையாளுவதற்கு மேல்நிலைப்பள்ளி இயக்கமாகும். பணி மேலாளர் ஒரு தெளிவான இடைமுகத்தை வழங்குவதற்கு, ஒழுங்குபடுத்தும் வேலைகளின் திறமையான அலகுகளாக உள்ளீடு மற்றும் பல்வேறு கூறுகளின் முழு வசதி எடுத்துக்கொள்கிறது. இது அப்போதைய பதிப்புக்களில் விரிவாக்கப்பட்டு, வேலை உள்நுழைக்கு பரிந்துரைக்கப்படும் நுழைவு புள்ளியாக மாறும்.
அதன் ` `.run () ` முறையில், சுற்றுப்பயணங்களின் பட்டியலை பெறுகிறது. ` ` ManagedJobSet நிகழ்வு ` ` ` ` ManagedJobSet உதாரணம் ` `, இது பின்னர் இந்த வேலைகளின் மாநிலங்கள் மற்றும் முடிவுகளையும் தடுக்க பயன்படுகிறது. உதாரணமாக:
from qiskit.providers.ibmq.managed import IBMQJobManager
from qiskit.circuit.random import random_circuit
from qiskit import IBMQ
from qiskit.compiler import transpile
provider = IBMQ.load_account()
backend = provider.backends.ibmq_ourense
circs = []
for _ in range(1000000):
circs.append(random_circuit(2, 2))
transpile(circs, backend=backend)
# Farm out the jobs.
jm = IBMQJobManager()
job_set = jm.run(circs, backend=backend, name='foo')
job_set.statuses() # Gives a list of job statuses
job_set.report() # Prints detailed job information
results = job_set.results()
counts = results.get_counts(5) # Returns data for experiment 5
பின்னணி மாற்றங்கள்¶
வழங்குநர்.பேக்கண்ட்ஸ்`` உறுப்பினர், முன்பு பின்தளத்தில் பட்டியலை வழங்கிய ஒரு செயல்பாடாக இருந்தது, இது ஒரு சேவைக்கு உயர்த்தப்பட்டது. இது முந்தைய வழியில், .பேக்கண்ட்ஸ் () `` முறையாகவும், விரிவாக்கப்பட்ட திறன்களைக் கொண்ட ``.பேக்கண்ட்ஸ் பண்புகளாகவும் பயன்படுத்தப்படலாம் என்பதை இது குறிக்கிறது:
இது அந்தப் பணியாளரால் இருந்து தற்போதைய பின்னணிகளை உள்ளடக்குகிறது. உதாரணமாக:
my_backend = provider.get_backend('ibmq_qasm_simulator')
இதற்கு சமம்:
my_backend = provider.backends.ibmq_qasm_simulator
`` வழங்குநர்.பேக்கண்ட்ஸ்.ஜோப்ஸ் () `` மற்றும் `` வழங்குநர்.
மற்ற மாற்றங்கள்¶
` Backend.properties () `` செயல்பாடு இப்போது விருப்பமான `` தேதிநேர`` அளவுருவை ஏற்றுக்கொள்கிறது. குறிப்பிடப்பட்டால், செயல்பாடு பின்தளத்தில் பண்புகளை மிக நெருக்கமான, ஆனால் குறிப்பிட்ட தேதிநேர வடிப்பானை விட பழையதாக வழங்குகிறது.
சில `` எச்சரிக்கைகள்`` `` லாஜர். எச்சரிக்கை`` செய்திகளுக்கு குறைக்கப்பட்டுள்ளன.
Qiskit 0. 13.0¶
டெரா 0.10.0¶
முன்னுரை¶
0.10.0 விடுதலை பல புதிய அம்சங்கள் மற்றும் பிழை திருத்தங்கள் ஆகியவற்றை உள்ளடக்குகிறது. இந்த விடுதலுக்கான மிகப்பெரிய மாற்றம் சிக்கிட் பயன்படுத்துவதற்கு ஆரம்ப ஆதரவு கூடியது.
புதிய அம்சங்கள்¶
`` குவாண்டம் சிர்குட்`` இல் புதிய முறைகளை அறிமுகப்படுத்தியது, இது ஒரு சுற்று முடிவில் அளவீடுகளை தடையின்றி சேர்க்க அல்லது அகற்ற அனுமதிக்கிறது.
- ` ` அளவு எல்லாம் () ` `
ஒரு `` தடையை`` சேர்க்கிறது, அதன்பிறகு சுற்றுகளில் உள்ள அனைத்து குவிட்டுகளுக்கும் `` அளவீட்டு`` செயல்பாடு சேர்க்கிறது. சுற்றுகளில் உள்ள குவிட்களின் எண்ணிக்கைக்கு சமமான `` கிளாசிக்கல் ரெஜிஸ்டர்`` அளவை உருவாக்குகிறது, இது அளவீடுகளை சேமிக்கிறது.
- ` ` அளவு செயலில் () ` `
சுற்றுகளில் உள்ள அனைத்து செயலில் உள்ள குவிட்டுகளுக்கும் ஒரு `` தடை`` ஐத் தொடர்ந்து `` அளவீட்டு`` செயல்பாட்டைச் சேர்க்கிறது. ஒரு குவிட் செயலில் குறைந்தது ஒரு செயல்பாட்டைக் கொண்டிருந்தால். சுற்றுகளில் செயலில் உள்ள குவிட்களின் எண்ணிக்கைக்கு சமமான ஒரு `` கிளாசிக்கல் ரெஜிஸ்டர்`` அளவை உருவாக்குகிறது, இது அளவீடுகளை சேமிக்கிறது.
- அகற்று_ இறுதி_ அளவீடுகள் () `
அனைத்து இறுதி அளவீடுகளையும் நீக்குகிறது மற்றும் ஒரு சுற்றிலிருந்து `` தடை`` க்கு முன்னால். தடைகள் மற்றும் பிற அளவீடுகளைத் தவிர்த்து, வேறு எந்த நடவடிக்கையும் பின்பற்றப்படாவிட்டால், ஒரு அளவீட்டு "இறுதி" என்று கருதப்படுகிறது. அளவீடுகள் அகற்றப்பட்ட பிறகு, `` கிளாசிக்கல் ரெஜிஸ்டர்`` இல் உள்ள கிளாசிக்கல் பிட்கள் அனைத்தும் செயலற்றதாக இருந்தால் (அவற்றுடன் எந்த நடவடிக்கைகளும் இணைக்கப்படவில்லை), பின்னர் `` கிளாசிக்கல் ரெஜிஸ்டர்`` அகற்றப்படும்.
எடுத்துக்காட்டுகள்:
# Using measure_all() circuit = QuantumCircuit(2) circuit.h(0) circuit.measure_all() circuit.draw() # A ClassicalRegister with prefix measure was created. # It has 2 clbits because there are 2 qubits to measure ┌───┐ ░ ┌─┐ q_0: |0>┤ H ├─░─┤M├─── └───┘ ░ └╥┘┌─┐ q_1: |0>──────░──╫─┤M├ ░ ║ └╥┘ measure_0: 0 ═════════╩══╬═ ║ measure_1: 0 ════════════╩═ # Using measure_active() circuit = QuantumCircuit(2) circuit.h(0) circuit.measure_active() circuit.draw() # This ClassicalRegister only has 1 clbit because only 1 qubit is active ┌───┐ ░ ┌─┐ q_0: |0>┤ H ├─░─┤M├ └───┘ ░ └╥┘ q_1: |0>──────░──╫─ ░ ║ measure_0: 0 ═════════╩═ # Using remove_final_measurements() # Assuming circuit_all and circuit_active are the circuits from the measure_all and # measure_active examples above respectively circuit_all.remove_final_measurements() circuit_all.draw() # The ClassicalRegister is removed because, after the measurements were removed, # all of its clbits were idle ┌───┐ q_0: |0>┤ H ├ └───┘ q_1: |0>───── circuit_active.remove_final_measurements() circuit_active.draw() # This will result in the same circuit ┌───┐ q_0: |0>┤ H ├ └───┘ q_1: |0>─────ஆயுதப் பக்கங்களின் பின்புலத்தைக் கொண்டு செயற்படுத்துவதற்கு ஆரம்ப ஆதரவு சேர்க்கப்பட்டது.
ஒரு Rxx வாயில் (rxx) மற்றும் ஒரு உலகளாவிய Mølmer-Sørensen gate (ms) தரப்பட்ட வாயுத் தளத்தில் சேர்க்கப்பட்டுள்ளது.
Rxx / Rx / Ry டிகம்போசருக்கு ஒரு முடிச்சு `` cnot_rxx_decompose`` மற்றும் ஒற்றை குவிட் யூலர் கோண டிகம்போசர் `` OneQubitEulerDecomposer`` ஆகியவை `` குவாண்டம்_இன்ஃபோ.சிந்தெசிஸ்`` தொகுதிக்கு சேர்க்கப்பட்டுள்ளன.
U3 மற்றும் Cnot வாயில்களில் வரையறுக்கப்பட்ட சுற்றுகளை Rxx, Ry மற்றும் Rx இல் வரையறுக்கப்பட்ட ஒரு சுற்றுக்குள் சேர்க்க ஒரு டிரான்ஸ்பைலர் பாஸ் `` MSBasisDecomposer`` சேர்க்கப்பட்டுள்ளது. இந்த பாஸ் பின்தளத்தில் முன்னமைக்கப்பட்ட பாஸ் மேலாளர்களில் சேர்க்கப்படும், இதில் 'rxx' வாயில் அவற்றின் ஆதரவு அடிப்படை வாயில்களில் அடங்கும்.
`` Qiskit.test.mock`` இல் உள்ள பின்தளத்தில் இப்போது உண்மையான சாதன அளவீட்டு தரவின் ஸ்னாப்ஷாட் உள்ளது. ஒவ்வொரு பின்தளத்தில் உள்ள `` பண்புகள் () `` முறை வழியாக இதை அணுகலாம். சத்தம்-தகவமைப்பு டிரான்ஸ்பைலர் பாஸ்கள் அல்லது உருவகப்படுத்துதலுக்கான சாதன இரைச்சல் மாதிரிகள் போன்ற பின்தளத்தில் பண்புகளைப் பொறுத்து எந்த குறியீட்டையும் சோதிக்க இதைப் பயன்படுத்தலாம். இது நேரடி பின்தளத்தில் செல்ல வேண்டிய அவசியமின்றி வேகமான சோதனை மற்றும் மேம்பாட்டு சுழற்சியை உருவாக்கும்.
Allows the Result class to return partial results. If a valid result schema is loaded that contains some experiments which succeeded and some which failed, this allows accessing the data from experiments that succeeded, while raising an exception for experiments that failed and displaying the appropriate error message for the failed results.
An
axkwarg has been added to the following visualization functions:qiskit.visualization.plot_histogramqiskit.visualization.plot_state_paulivecqiskit.visualization.plot_state_qsphereqiskit.visualization.circuit_drawer(mplbackend only)qiskit.QuantumCircuit.draw(mplbackend only)
This kwarg is used to pass in a
matplotlib.axes.Axesobject to the visualization functions. This enables integrating these visualization functions into a larger visualization workflow. Also, if an ax kwarg is specified then there is no return from the visualization functions.An
ax_realandax_imagkwarg has been added to the following visualization functions:qiskit.visualization.plot_state_hintonqiskit.visualization.plot_state_city
These new kargs work the same as the newly added
axkwargs for other visualization functions. However because these plots use two axes (one for the real component, the other for the imaginary component). Having two kwargs also provides the flexibility to only generate a visualization for one of the components instead of always doing both. For example:from matplotlib import pyplot as plt from qiskit.visualization import plot_state_hinton ax = plt.gca() plot_state_hinton(psi, ax_real=ax)
will only generate a plot of the real component.
A given pass manager now can be edited with the new method replace. This method allows to replace a particular stage in a pass manager, which can be handy when dealing with preset pass managers. For example, let's edit the layout selector of the pass manager used at optimization level 0:
from qiskit.transpiler.preset_passmanagers.level0 import level_0_pass_manager from qiskit.transpiler.transpile_config import TranspileConfig pass_manager = level_0_pass_manager(TranspileConfig(coupling_map=CouplingMap([[0,1]]))) pass_manager.draw()
[0] FlowLinear: SetLayout [1] Conditional: TrivialLayout [2] FlowLinear: FullAncillaAllocation, EnlargeWithAncilla, ApplyLayout [3] FlowLinear: Unroller
The layout selection is set in the stage [1]. Let's replace it with DenseLayout:
from qiskit.transpiler.passes import DenseLayout pass_manager.replace(1, DenseLayout(coupling_map), condition=lambda property_set: not property_set['layout']) pass_manager.draw()
[0] FlowLinear: SetLayout [1] Conditional: DenseLayout [2] FlowLinear: FullAncillaAllocation, EnlargeWithAncilla, ApplyLayout [3] FlowLinear: Unroller
If you want to replace it without any condition, you can use set-item shortcut:
pass_manager[1] = DenseLayout(coupling_map) pass_manager.draw()
[0] FlowLinear: SetLayout [1] FlowLinear: DenseLayout [2] FlowLinear: FullAncillaAllocation, EnlargeWithAncilla, ApplyLayout [3] FlowLinear: Unroller
Introduced a new pulse command
Delaywhich may be inserted into a pulseSchedule. This command accepts adurationand may be added to anyChannel. Other commands may not be scheduled on a channel during a delay.The delay can be added just like any other pulse command. For example:
from qiskit import pulse from qiskit.pulse.utils import pad dc0 = pulse.DriveChannel(0) delay = pulse.Delay(1) test_pulse = pulse.SamplePulse([1.0]) sched = pulse.Schedule() sched += test_pulse(dc0).shift(1) # build padded schedule by hand ref_sched = delay(dc0) | sched # pad schedule padded_sched = pad(sched) assert padded_sched == ref_sched
One may also pass additional channels to be padded and a time to pad until, for example:
from qiskit import pulse from qiskit.pulse.utils import pad dc0 = pulse.DriveChannel(0) dc1 = pulse.DriveChannel(1) delay = pulse.Delay(1) test_pulse = pulse.SamplePulse([1.0]) sched = pulse.Schedule() sched += test_pulse(dc0).shift(1) # build padded schedule by hand ref_sched = delay(dc0) | delay(dc1) | sched # pad schedule across both channels until up until the first time step padded_sched = pad(sched, channels=[dc0, dc1], until=1) assert padded_sched == ref_sched
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
Assignments and modifications to the
dataattribute ofqiskit.QuantumCircuitobjects are now validated following the same rules used throughout theQuantumCircuitAPI. This was done to improve the performance of the circuits API since we can now assume thedataattribute is in a known format. If you were manually modifying thedataattribute of a circuit object before this may no longer work if your modifications resulted in a data structure other than the list of instructions with context in the format[(instruction, qargs, cargs)]The transpiler default passmanager for optimization level 2 now uses the
DenseLayoutlayout selection mechanism by default instead ofNoiseAdaptiveLayout. TheDenselayoutpass has also been modified to be made noise-aware.The deprecated
DeviceSpecificationclass has been removed. Instead you should use thePulseChannelSpec. For example, you can run something like:device = pulse.PulseChannelSpec.from_backend(backend) device.drives[0] # for DeviceSpecification, this was device.q[0].drive device.memoryslots # this was device.mem
The deprecated module
qiskit.pulse.opshas been removed. UseScheduleandInstructionmethods directly. For example, rather than:ops.union(schedule_0, schedule_1) ops.union(instruction, schedule) # etc
Instead please use:
schedule_0.union(schedule_1) instruction.union(schedule)
This same pattern applies to other
opsfunctions:insert,shift,append, andflatten.
தேய்மான குறிப்புகள்¶
Using the
controlproperty ofqiskit.circuit.Instructionfor classical control is now deprecated. In the future this property will be used for quantum control. Classically conditioned operations will instead be handled by theconditionproperty ofqiskit.circuit.Instruction.Support for setting
qiskit.circuit.Instructionparameters with an object of typeqiskit.qasm.node.Nodehas been deprecated.Nodeobjects that were previously used as parameters should be converted to a supported type prior to initializing a newInstructionobject or calling theInstruction.paramssetter. Supported types areint,float,complex,str,qiskit.circuit.ParameterExpression, ornumpy.ndarray.In the qiskit 0.9.0 release the representation of bits (both qubits and classical bits) changed from tuples of the form
(register, index)to be instances of the classesqiskit.circuit.Qubitandqiskit.circuit.Clbit. For backwards compatibility comparing the equality between a legacy tuple and the bit classes was supported as everything transitioned from tuples to being objects. This support is now deprecated and will be removed in the future. Everything should use the bit classes instead of tuples moving forward.When the
mploutput is used for eitherqiskit.QuantumCircuit.draw()orqiskit.visualization.circuit_drawer()and thestylekwarg is used, passing in unsupported dictionary keys as part of thestyle`dictionary is now deprecated. Where these unknown arguments were previously silently ignored, in the future, unsupported keys will raise an exception.The
line lengthkwarg for theqiskit.QuantumCircuit.draw()method and theqiskit.visualization.circuit_drawer()function with the text output mode is deprecated. It has been replaced by thefoldkwarg which will behave identically for the text output mode (but also now supports the mpl output mode too).line_lengthwill be removed in a future release so calls should be updated to usefoldinstead.The
foldfield in thestyledict kwarg for theqiskit.QuantumCircuit.draw()method and theqiskit.visualization.circuit_drawer()function has been deprecated. It has been replaced by thefoldkwarg on both functions. This kwarg behaves identically to the field in the style dict.
பிழை திருத்தங்கள்¶
Instructions layering which underlies all types of circuit drawing has changed to address right/left justification. This sometimes results in output which is topologically equivalent to the rendering in prior versions but visually different than previously rendered. Fixes issue #2802
Add
memory_slotstoQobjExperimentHeaderof pulse Qobj. This fixes a bug in the data format ofmeas_level=2results of pulse experiments. Measured quantum states are returned as a bit string with zero padding based on the number set formemory_slots.Fixed the visualization of the rzz gate in the latex circuit drawer to match the cu1 gate to reflect the symmetry in the rzz gate. The fix is based on the cds command of the qcircuit latex package. Fixes issue #1957
பிற குறிப்புகள்¶
matplotlib.figure.Figureobjects returned by visualization functions are no longer always closed by default. Instead the returned figure objects are only closed if the configured matplotlib backend is an inline jupyter backend(either set with%matplotlib inlineor%matplotlib notebook). Output figure objects are still closed with these backends to avoid duplicate outputs in jupyter notebooks (which is why theFigure.close()were originally added).
Aer 0.3¶
No Change
Ignis 0.2¶
No Change
Aqua 0.6¶
No Change
IBM Q Provider 0.3¶
No Change
Qiskit 0.12.0¶
Terra 0.9¶
முன்னுரை¶
The 0.9 release includes many new features and many bug fixes. The biggest
changes for this release are new debugging capabilities for PassManagers. This
includes a function to visualize a PassManager, the ability to add a callback
function to a PassManager, and logging of passes run in the PassManager.
Additionally, this release standardizes the way that you can set an initial
layout for your circuit. So now you can leverage initial_layout the kwarg
parameter on qiskit.compiler.transpile() and qiskit.execute() and the
qubits in the circuit will get laid out on the desire qubits on the device.
Visualization of circuits will now also show this clearly when visualizing a
circuit that has been transpiled with a layout.
புதிய அம்சங்கள்¶
A
DAGCircuitobject (i.e. the graph representation of a QuantumCircuit where operation dependencies are explicit) can now be visualized with the.draw()method. This is in line with Qiskit's philosophy of easy visualization. Other objects which support a.draw()method areQuantumCircuit,PassManager, andSchedule.Added a new visualization function
qiskit.visualization.plot_error_map()to plot the error map for a given backend. It takes in a backend object from the qiskit-ibmq-provider and will plot the current error map for that device.Both
qiskit.QuantumCircuit.draw()andqiskit.visualization.circuit_drawer()now support annotating the qubits in the visualization with layout information. If theQuantumCircuitobject being drawn includes layout metadata (which is normally only set on the circuit output fromtranspile()calls) then by default that layout will be shown on the diagram. This is done for all circuit drawer backends. For example:from qiskit import ClassicalRegister, QuantumCircuit, QuantumRegister from qiskit.compiler import transpile qr = QuantumRegister(2, 'userqr') cr = ClassicalRegister(2, 'c0') qc = QuantumCircuit(qr, cr) qc.h(qr[0]) qc.cx(qr[0], qr[1]) qc.y(qr[0]) qc.x(qr[1]) qc.measure(qr, cr) # Melbourne coupling map coupling_map = [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10], [5, 4], [5, 6], [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10], [11, 12], [12, 2], [13, 1], [13, 12]] qc_result = transpile(qc, basis_gates=['u1', 'u2', 'u3', 'cx', 'id'], coupling_map=coupling_map, optimization_level=0) qc.draw(output='text')
will yield a diagram like:
┌──────────┐┌──────────┐┌───┐┌──────────┐┌──────────────────┐┌─┐ (userqr0) q0|0>┤ U2(0,pi) ├┤ U2(0,pi) ├┤ X ├┤ U2(0,pi) ├┤ U3(pi,pi/2,pi/2) ├┤M├─── ├──────────┤└──────────┘└─┬─┘├──────────┤└─┬─────────────┬──┘└╥┘┌─┐ (userqr1) q1|0>┤ U2(0,pi) ├──────────────■──┤ U2(0,pi) ├──┤ U3(pi,0,pi) ├────╫─┤M├ └──────────┘ └──────────┘ └─────────────┘ ║ └╥┘ (ancilla0) q2|0>──────────────────────────────────────────────────────────────╫──╫─ ║ ║ (ancilla1) q3|0>──────────────────────────────────────────────────────────────╫──╫─ ║ ║ (ancilla2) q4|0>──────────────────────────────────────────────────────────────╫──╫─ ║ ║ (ancilla3) q5|0>──────────────────────────────────────────────────────────────╫──╫─ ║ ║ (ancilla4) q6|0>──────────────────────────────────────────────────────────────╫──╫─ ║ ║ (ancilla5) q7|0>──────────────────────────────────────────────────────────────╫──╫─ ║ ║ (ancilla6) q8|0>──────────────────────────────────────────────────────────────╫──╫─ ║ ║ (ancilla7) q9|0>──────────────────────────────────────────────────────────────╫──╫─ ║ ║ (ancilla8) q10|0>──────────────────────────────────────────────────────────────╫──╫─ ║ ║ (ancilla9) q11|0>──────────────────────────────────────────────────────────────╫──╫─ ║ ║ (ancilla10) q12|0>──────────────────────────────────────────────────────────────╫──╫─ ║ ║ (ancilla11) q13|0>──────────────────────────────────────────────────────────────╫──╫─ ║ ║ c0_0: 0 ══════════════════════════════════════════════════════════════╩══╬═ ║ c0_1: 0 ═════════════════════════════════════════════════════════════════╩═If you do not want the layout to be shown on transpiled circuits (or any other circuits with a layout set) there is a new boolean kwarg for both functions,
with_layout(which defaultsTrue), which when setFalsewill disable the layout annotation in the output circuits.A new analysis pass
CountOpsLongestwas added to retrieve the number of operations on the longest path of the DAGCircuit. When used it will add acount_ops_longest_pathkey to the property set dictionary. You can add it to your a passmanager with something like:from qiskit.transpiler.passes import CountOpsLongestPath from qiskit.transpiler.passes import CxCancellation from qiskit.transpiler import PassManager pm = PassManager() pm.append(CountOpsLongestPath())
and then access the longest path via the property set value with something like:
pm.append( CxCancellation(), condition=lambda property_set: property_set[ 'count_ops_longest_path'] < 5)
which will set a condition on that pass based on the longest path.
Two new functions,
sech()andsech_deriv()were added to the pulse library moduleqiskit.pulse.pulse_libfor creating an unnormalized hyperbolic secantSamplePulseobject and an unnormalized hyperbolic secant derviativeSamplePulseobject respectively.A new kwarg option
vertical_compressionwas added to theQuantumCircuit.draw()method and theqiskit.visualization.circuit_drawer()function. This option only works with thetextbackend. This option can be set to eitherhigh,medium(the default), orlowto adjust how much vertical space is used by the output visualization.A new kwarg boolean option
idle_wireswas added to theQuantumCircuit.draw()method and theqiskit.visualization.circuit_drawer()function. It works for all drawer backends. Whenidle_wiresis set False in a drawer call the drawer will not draw any bits that do not have any circuit elements in the output quantum circuit visualization.A new PassManager visualizer function
qiskit.visualization.pass_mamanger_drawer()was added. This function takes in a PassManager object and will generate a flow control diagram of all the passes run in the PassManager.When creating a PassManager you can now specify a callback function that if specified will be run after each pass is executed. This function gets passed a set of kwargs on each call with the state of the pass manager after each pass execution. Currently these kwargs are:
pass_(Pass): the pass being rundag(DAGCircuit): the dag output of the passtime(float): the time to execute the passproperty_set(PropertySet): the property setcount(int): the index for the pass execution
However, it's worth noting that while these arguments are set for the 0.9 release they expose the internals of the pass manager and are subject to change in future release.
For example you can use this to create a callback function that will visualize the circuit output after each pass is executed:
from qiskit.transpiler import PassManager def my_callback(**kwargs): print(kwargs['dag']) pm = PassManager(callback=my_callback)
Additionally you can specify the callback function when using
qiskit.compiler.transpile():from qiskit.compiler import transpile def my_callback(**kwargs): print(kwargs['pass']) transpile(circ, callback=my_callback)
A new method
filter()was added to theqiskit.pulse.Scheduleclass. This enables filtering the instructions in a schedule. For example, filtering by instruction type:from qiskit.pulse import Schedule from qiskit.pulse.commands import Acquire from qiskit.pulse.commands import AcquireInstruction from qiskit.pulse.commands import FrameChange sched = Schedule(name='MyExperiment') sched.insert(0, FrameChange(phase=-1.57)(device)) sched.insert(60, Acquire(5)) acquire_sched = sched.filter(instruction_types=[AcquireInstruction])
Additional decomposition methods for several types of gates. These methods will use different decomposition techniques to break down a gate into a sequence of CNOTs and single qubit gates. The following methods are added:
Method
Description
QuantumCircuit.iso()Add an arbitrary isometry from m to n qubits to a circuit. This allows for attaching arbitrary unitaries on n qubits (m=n) or to prepare any state of n qubits (m=0)
QuantumCircuit.diag_gate()Add a diagonal gate to the circuit
QuantumCircuit.squ()Decompose an arbitrary 2x2 unitary into three rotation gates and add to a circuit
QuantumCircuit.ucg()Attach an uniformly controlled gate (also called a multiplexed gate) to a circuit
QuantumCircuit.ucx()Attach a uniformly controlled (also called multiplexed) Rx rotation gate to a circuit
QuantumCircuit.ucy()Attach a uniformly controlled (also called multiplexed) Ry rotation gate to a circuit
QuantumCircuit.ucz()Attach a uniformly controlled (also called multiplexed) Rz rotation gate to a circuit
Addition of Gray-Synth and Patel–Markov–Hayes algorithms for synthesis of CNOT-Phase and CNOT-only linear circuits. These functions allow the synthesis of circuits that consist of only CNOT gates given a linear function or a circuit that consists of only CNOT and phase gates given a matrix description.
A new function
random_circuitwas added to theqiskit.circuit.randommodule. This function will generate a random circuit of a specified size by randomly selecting different gates and adding them to the circuit. For example, you can use this to generate a 5-qubit circuit with a depth of 10 using:from qiskit.circuit.random import random_circuit circ = random_circuit(5, 10)
A new kwarg
output_nameswas added to theqiskit.compiler.transpile()function. This kwarg takes in a string or a list of strings and uses those as the value of the circuit name for the output circuits that get returned by thetranspile()call. For example:from qiskit.compiler import transpile my_circs = [circ_a, circ_b] tcirc_a, tcirc_b = transpile(my_circs, output_names=['Circuit A', 'Circuit B'])
the
nameattribute on tcirc_a and tcirc_b will be'Circuit A'and'Circuit B'respectively.A new method
equiv()was added to theqiskit.quantum_info.Operatorandqiskit.quantum_info.Statevectorclasses. These methods are used to check whether a secondOperatorobject orStatevectoris equivalent up to global phase.The user config file has several new options:
The
circuit_drawerfield now accepts an auto value. When set as the value for thecircuit_drawerfield the default drawer backend will be mpl if it is available, otherwise the text backend will be used.A new field
circuit_mpl_stylecan be used to set the default style used by the matplotlib circuit drawer. Valid values for this field arebwanddefaultto set the default to a black and white or the default color style respectively.A new field
transpile_optimization_levelcan be used to set the default transpiler optimization level to use for calls toqiskit.compiler.transpile(). The value can be set to either 0, 1, 2, or 3.
Introduced a new pulse command
Delaywhich may be inserted into a pulseSchedule. This command accepts adurationand may be added to anyChannel. Other commands may not be scheduled on a channel during a delay.The delay can be added just like any other pulse command. For example:
from qiskit import pulse drive_channel = pulse.DriveChannel(0) delay = pulse.Delay(20) sched = pulse.Schedule() sched += delay(drive_channel)
குறிப்புகளை மேம்படுத்தவும் #: ../../release_notes .rs t :54 ../../release_not e s.r s t:240 #: ../../release_no t es. r st:480 ../../release_no tes . rst:710 #: ../../release_ n ot es .rst:879 ../../release _ no te s.rst:1491 #: ../../releas e _n ot es.rst:1915 ../../relea s e_ no tes.rst:2172 #: ../../rele a se _n otes.rst:2552 ../../rel e as e_ notes.rst:2694 #: ../../re l ea se _notes.rst:2767 ../../r e le as e_notes.rst:3507 #: ../../ r el ea se_notes.rst:4156 ../.. / re le ase_notes.rst:4273 #: ../. . /r el ease_notes.rst:4552 .. /. . /re lease_notes.rst:4634 #: ../ ../r elease_notes.rst:4706 .. /../ release_notes.rst:4755¶
The previously deprecated
qiskit._utilmodule has been removed.qiskit.utilshould be used instead.The
QuantumCircuit.count_ops()method now returns anOrderedDictobject instead of adict. This should be compatible for most use cases sinceOrderedDictis adictsubclass. However type checks and other class checks might need to be updated.The
DAGCircuit.width()method now returns the total number quantum bits and classical bits. Before it would only return the number of quantum bits. If you require just the number of quantum bits you can useDAGCircuit.num_qubits()instead.The function
DAGCircuit.num_cbits()has been removed. Instead you can useDAGCircuit.num_clbits().Individual quantum bits and classical bits are no longer represented as
(register, index)tuples. They are now instances of Qubit and Clbit classes. If you're dealing with individual bits make sure that you update any usage or type checks to look for these new classes instead of tuples.The preset passmanager classes
qiskit.transpiler.preset_passmanagers.default_pass_managerandqiskit.transpiler.preset_passmanagers.default_pass_manager_simulator(which were the previous default pass managers forqiskit.compiler.transpile()calls) have been removed. If you were manually using this pass managers switch to the new default,qiskit.transpile.preset_passmanagers.level1_pass_manager.The
LegacySwappass has been removed. If you were using it in a custom pass manager, it's usage can be replaced by theStochasticSwappass, which is a faster more stable version. All the preset passmanagers have been updated to useStochasticSwappass instead of theLegacySwap.The following deprecated
qiskit.dagcircuit.DAGCircuitmethods have been removed:DAGCircuit.get_qubits()- UseDAGCircuit.qubits()insteadDAGCircuit.get_bits()- UseDAGCircuit.clbits()insteadDAGCircuit.qasm()- Use a combination ofqiskit.converters.dag_to_circuit()andQuantumCircuit.qasm(). For example:from qiskit.dagcircuit import DAGCircuit from qiskit.converters import dag_to_circuit my_dag = DAGCircuit() qasm = dag_to_circuit(my_dag).qasm()
DAGCircuit.get_op_nodes()- UseDAGCircuit.op_nodes()instead. Note that the return type is a list ofDAGNodeobjects forop_nodes()instead of the list of tuples previously returned byget_op_nodes().DAGCircuit.get_gate_nodes()- UseDAGCircuit.gate_nodes()instead. Note that the return type is a list ofDAGNodeobjects forgate_nodes()instead of the list of tuples previously returned byget_gate_nodes().DAGCircuit.get_named_nodes()- UseDAGCircuit.named_nodes()instead. Note that the return type is a list ofDAGNodeobjects fornamed_nodes()instead of the list of node_ids previously returned byget_named_nodes().DAGCircuit.get_2q_nodes()- UseDAGCircuit.twoQ_gates()instead. Note that the return type is a list ofDAGNodeobjects fortwoQ_gates()instead of the list of data_dicts previously returned byget_2q_nodes().DAGCircuit.get_3q_or_more_nodes()- UseDAGCircuit.threeQ_or_more_gates()instead. Note that the return type is a list ofDAGNodeobjects forthreeQ_or_more_gates()instead of the list of tuples previously returned byget_3q_or_more_nodes().
The following
qiskit.dagcircuit.DAGCircuitmethods had deprecated support for accepting anode_idas a parameter. This has been removed and now onlyDAGNodeobjects are accepted as input:successors()predecessors()ancestors()descendants()bfs_successors()quantum_successors()remove_op_node()remove_ancestors_of()remove_descendants_of()remove_nonancestors_of()remove_nondescendants_of()substitute_node_with_dag()
The
qiskit.dagcircuit.DAGCircuitmethodrename_register()has been removed. This was unused by all the qiskit code. If you were relying on it externally you'll have to re-implement is an external function.The
qiskit.dagcircuit.DAGCircuitpropertymulti_graphhas been removed. Direct access to the underlyingnetworkxmulti_graphobject isn't supported anymore. The API provided by theDAGCircuitclass should be used instead.The deprecated exception class
qiskit.qiskiterror.QiskitErrorhas been removed. Instead you should useqiskit.exceptions.QiskitError.The boolean kwargs,
ignore_requiresandignore_preservesfrom theqiskit.transpiler.PassManagerconstructor have been removed. These are no longer valid options.The module
qiskit.tools.logginghas been removed. This module was not used by anything and added nothing over the interfaces that Python's standard libraryloggingmodule provides. If you want to set a custom formatter for logging use the standard libraryloggingmodule instead.The
CompositeGateclass has been removed. Instead you should directly create a instruction object from a circuit and append that to your circuit. For example, you can run something like:custom_gate_circ = qiskit.QuantumCircuit(2) custom_gate_circ.x(1) custom_gate_circ.h(0) custom_gate_circ.cx(0, 1) custom_gate = custom_gate_circ.to_instruction()
The previously deprecated kwargs,
seedandconfigforqiskit.compiler.assemble()have been removed useseed_simulatorandrun_configrespectively instead.The previously deprecated converters
qiskit.converters.qobj_to_circuits()andqiskit.converters.circuits_to_qobj()have been removed. Useqiskit.assembler.disassemble()andqiskit.compiler.assemble()respectively instead.The previously deprecated kwarg
seed_mapperforqiskit.compiler.transpile()has been removed. Instead you should useseed_transpilerThe previously deprecated kwargs
seed,seed_mapper,config, andcircuitsfor theqiskit.execute()function have been removed. Useseed_simulator,seed_transpiler,run_config, andexperimentsarguments respectively instead.The previously deprecated
qiskit.tools.qcvvmodule has been removed use qiskit-ignis instead.The previously deprecated functions
qiskit.transpiler.transpile()andqiskit.transpiler.transpile_dag()have been removed. Instead you should useqiskit.compiler.transpile. If you were usingtranspile_dag()this can be replaced by running:circ = qiskit.converters.dag_to_circuit(dag) out_circ = qiskit.compiler.transpile(circ) qiskit.converters.circuit_to_dag(out_circ)
The previously deprecated function
qiskit.compile()has been removed instead you should useqiskit.compiler.transpile()andqiskit.compiler.assemble().The jupyter cell magic
%%qiskit_progress_barfromqiskit.tools.jupyterhas been changed to a line magic. This was done to better reflect how the magic is used and how it works. If you were using the%%qiskit_progress_barcell magic in an existing notebook, you will have to update this to be a line magic by changing it to be%qiskit_progress_barinstead. Everything else should behave identically.The deprecated function
qiskit.tools.qi.qi.random_unitary_matrix()has been removed. You should use theqiskit.quantum_info.random.random_unitary()function instead.The deprecated function
qiskit.tools.qi.qi.random_density_matrix()has been removed. You should use theqiskit.quantum_info.random.random_density_matrix()function instead.The deprecated function
qiskit.tools.qi.qi.purity()has been removed. You should theqiskit.quantum_info.purity()function instead.The deprecated
QuantumCircuit._attach()method has been removed. You should useQuantumCircuit.append()instead.The
qiskit.qasm.Qasmmethodget_filename()has been removed. You can use thereturn_filename()method instead.The deprecated
qiskit.mappermodule has been removed. The list of functions and classes with their alternatives are:qiskit.mapper.CouplingMap:qiskit.transpiler.CouplingMapshould be used instead.qiskit.mapper.Layout:qiskit.transpiler.Layoutshould be used insteadqiskit.mapper.compiling.euler_angles_1q():qiskit.quantum_info.synthesis.euler_angles_1q()should be used insteadqiskit.mapper.compiling.two_qubit_kak():qiskit.quantum_info.synthesis.two_qubit_cnot_decompose()should be used instead.
The deprecated exception classes
qiskit.mapper.exceptions.CouplingErrorandqiskit.mapper.exceptions.LayoutErrordon't have an alternative since they serve no purpose without aqiskit.mappermodule.The
qiskit.pulse.samplersmodule has been moved toqiskit.pulse.pulse_lib.samplers. You will need to update imports ofqiskit.pulse.samplerstoqiskit.pulse.pulse_lib.samplers.seaborn is now a dependency for the function
qiskit.visualization.plot_state_qsphere(). It is needed to generate proper angular color maps for the visualization. Theqiskit-terra[visualization]extras install target has been updated to installseaborn>=0.9.0If you are using visualizations and specifically theplot_state_qsphere()function you can use that to installseabornor just manually runpip install seaborn>=0.9.0The previously deprecated functions
qiksit.visualization.plot_stateandqiskit.visualization.iplot_statehave been removed. Instead you should use the specific function for each plot type. You can refer to the following tables to map the deprecated functions to their equivalent new ones:Qiskit Terra 0.6
Qiskit Terra 0.7+
plot_state(rho)
plot_state_city(rho)
plot_state(rho, method='city')
plot_state_city(rho)
plot_state(rho, method='paulivec')
plot_state_paulivec(rho)
plot_state(rho, method='qsphere')
plot_state_qsphere(rho)
plot_state(rho, method='bloch')
plot_bloch_multivector(rho)
plot_state(rho, method='hinton')
plot_state_hinton(rho)
The
pylatexencandpillowdependencies for thelatexandlatex_sourcecircuit drawer backends are no longer listed as requirements. If you are going to use the latex circuit drawers ensure you have both packages installed or use the setuptools extras to install it along with qiskit-terra:pip install qiskit-terra[visualization]
The root of the
qiskitnamespace will now emit a warning on import if eitherqiskit.IBMQorqiskit.Aercould not be setup. This will occur whenever anything in theqiskitnamespace is imported. These warnings were added to make it clear for users up front if they're running qiskit and the qiskit-aer and qiskit-ibmq-provider packages could not be found. It's not always clear if the packages are missing or python packaging/pip installed an element incorrectly until you go to use them and get an emptyImportError. These warnings should make it clear up front if there these commonly used aliases are missing.However, for users that choose not to use either qiskit-aer or qiskit-ibmq-provider this might cause additional noise. For these users these warnings are easily suppressable using Python's standard library
warnings. Users can suppress the warnings by putting these two lines before any imports from qiskit:import warnings warnings.filterwarnings('ignore', category=RuntimeWarning, module='qiskit')
This will suppress the warnings emitted by not having qiskit-aer or qiskit-ibmq-provider installed, but still preserve any other warnings emitted by qiskit or any other package.
தேய்மான குறிப்புகள்¶
The
UandCXgates have been deprecated. If you're using these gates in your code you should update them to useu3andcxinstead. For example, if you're using the circuit gate functionscircuit.u_base()andcircuit.cx_base()you should update these to becircuit.u3()andcircuit.cx()respectively.The
u0gate has been deprecated in favor of using multipleidengates and it will be removed in the future. If you're using theu0gate in your circuit you should update your calls to useiden. For example, f you were usingcircuit.u0(2)in your circuit before that should be updated to be:circuit.iden() circuit.iden()
instead.
The
qiskit.pulse.DeviceSpecificationclass is deprecated now. Instead you should useqiskit.pulse.PulseChannelSpec.Accessing a
qiskit.circuit.Qubit,qiskit.circuit.Clbit, orqiskit.circuit.Bitclass by index is deprecated (for compatibility with the(register, index)tuples that these classes replaced). Instead you should use theregisterandindexattributes.Passing in a bit to the
qiskit.QuantumCircuitmethodappendas a tuple(register, index)is deprecated. Instead bit objects should be used directly.Accessing the elements of a
qiskit.transpiler.Layoutobject with a tuple(register, index)is deprecated. Instead a bit object should be used directly.The
qiskit.transpiler.Layoutconstructor methodqiskit.transpiler.Layout.from_tuplelist()is deprecated. Instead the constructorqiskit.transpiler.Layout.from_qubit_list()should be used.The module
qiskit.pulse.opshas been deprecated. All the functions it provided:unionflattenshiftinsertappend
have equivalent methods available directly on the
qiskit.pulse.Scheduleandqiskit.pulse.Instructionclasses. Those methods should be used instead.The
qiskit.qasm.Qasmmethodget_tokens()is deprecated. Instead you should use thegenerate_tokens()method.The
qiskit.qasm.qasmparser.QasmParsermethodget_tokens()is deprecated. Instead you should use theread_tokens()method.The
as_dict()method for the Qobj class has been deprecated and will be removed in the future. You should replace calls to it withto_dict()instead.
பிழை திருத்தங்கள்¶
The definition of the
CU3Gatehas been changed to be equivalent to the canonical definition of a controlledU3Gate.The handling of layout in the pass manager has been standardized. This fixes several reported issues with handling layout. The
initial_layoutkwarg parameter onqiskit.compiler.transpile()andqiskit.execute()will now lay out your qubits from the circuit onto the desired qubits on the device when transpiling circuits.Support for n-qubit unitaries was added to the BasicAer simulator and
unitary(arbitrary unitary gates) was added to the set of basis gates for the simulatorsThe
qiskit.visualization.plost_state_qsphere()has been updated to fix several issues with it. Now output Q Sphere visualization will be correctly generated and the following aspects have been updated:All complementary basis states are antipodal
Phase is indicated by color of line and marker on sphere's surface
- Probability is indicated by translucency of line and volume of marker on
sphere's surface
பிற குறிப்புகள்¶
The default PassManager for
qiskit.compiler.transpile()andqiskit.execute()has been changed to optimization level 1 pass manager defined atqiskit.transpile.preset_passmanagers.level1_pass_manager.All the circuit drawer backends now will express gate parameters in a circuit as common fractions of pi in the output visualization. If the value of a parameter can be expressed as a fraction of pi that will be used instead of the numeric equivalent.
When using
qiskit.assembler.assemble_schedules()if you do not provide the number of memory_slots to use the number will be inferred based on the number of acquisitions in the input schedules.The deprecation warning on the
qiskit.dagcircuit.DAGCircuitpropertynode_counterhas been removed. The behavior change being warned about was put into effect when the warning was added, so warning that it had changed served no purpose.Calls to
PassManager.run()now will emit python logging messages at the INFO level for each pass execution. These messages will include the Pass name and the total execution time of the pass. Python's standard logging was used because it allows Qiskit-Terra's logging to integrate in a standard way with other applications and libraries. All logging for the transpiler occurs under theqiskit.transpilernamespace, as used bylogging.getLogger('qiskit.transpiler). For example, to turn on DEBUG level logging for the transpiler you can run:import logging logging.basicConfig() logging.getLogger('qiskit.transpiler').setLevel(logging.DEBUG)
which will set the log level for the transpiler to DEBUG and configure those messages to be printed to stderr.
Aer 0.3¶
There's a new high-performance Density Matrix Simulator that can be used in conjunction with our noise models, to better simulate real world scenarios.
We have added a Matrix Product State (MPS) simulator. MPS allows for efficient simulation of several classes of quantum circuits, even under presence of strong correlations and highly entangled states. For cases amenable to MPS, circuits with several hundred qubits and more can be exactly simulated, e.g., for the purpose of obtaining expectation values of observables.
Snapshots can be performed in all of our simulators.
Now we can measure sampling circuits with read-out errors too, not only ideal circuits.
We have increased some circuit optimizations with noise presence.
A better 2-qubit error approximations have been included.
Included some tools for making certain noisy simulations easier to craft and faster to simulate.
Increased performance with simulations that require less floating point numerical precision.
Ignis 0.2¶
புதிய அம்சங்கள்¶
Seed values can now be arbitrarily added to RB (not just in order)
Support for adding multiple results to measurement mitigation
RB Fitters now support providing guess values
பிழை திருத்தங்கள்¶
Fixed a bug in RB fit error
Fixed a bug in the characterization fitter when selecting a qubit index to fit
பிற குறிப்புகள்¶
Measurement mitigation now operates in parallel when applied to multiple results
Guess values for RB fitters are improved
Aqua 0.6¶
Added¶
Relative-Phase Toffoli gates
rccx(with 2 controls) andrcccx(with 3 controls).Variational form
RYCRXA new
'basic-no-ancilla'mode tomct.Multi-controlled rotation gates
mcrx,mcry, andmcrzas a generalu3gate is not supported by graycode implementationChemistry: ROHF open-shell support
Supported for all drivers: Gaussian16, PyQuante, PySCF and PSI4
HartreeFock initial state, UCCSD variational form and two qubit reduction for parity mapping now support different alpha and beta particle numbers for open shell support
Chemistry: UHF open-shell support
Supported for all drivers: Gaussian16, PyQuante, PySCF and PSI4
QMolecule extended to include integrals, coefficients etc for separate beta
Chemistry: QMolecule extended with integrals in atomic orbital basis to facilitate common access to these for experimentation
Supported for all drivers: Gaussian16, PyQuante, PySCF and PSI4
Chemistry: Additional PyQuante and PySCF driver configuration
Convergence tolerance and max convergence iteration controls.
For PySCF initial guess choice
Chemistry: Processing output added to debug log from PyQuante and PySCF computations (Gaussian16 and PSI4 outputs were already added to debug log)
Chemistry: Merged qiskit-chemistry into qiskit-aqua
Add
MatrixOperator,WeightedPauliOperatorandTPBGroupedPauliOperatorclass.Add
evolution_instructionfunction to get registerless instruction of time evolution.Add
op_convertermodule to unify the place in charge of converting different types of operators.Add
Z2Symmetriesclass to encapsulate the Z2 symmetries info and has helper methods for tapering an Operator.Amplitude Estimation: added maximum likelihood postprocessing and confidence interval computation.
Maximum Likelihood Amplitude Estimation (MLAE): Implemented new algorithm for amplitude estimation based on maximum likelihood estimation, which reduces number of required qubits and circuit depth.
Added (piecewise) linearly and polynomially controlled Pauli-rotation circuits.
Add
q_equation_of_motionto study excited state of a molecule, and add two algorithms to prepare the reference state.
Changed¶
Improve
mct's'basic'mode by using relative-phase Toffoli gates to build intermediate results.Adapt to Qiskit Terra's newly introduced
Qubitclass.Prevent
QPE/IQPEfrom modifying inputOperatorobjects.The PyEDA dependency was removed; corresponding oracles' underlying logic operations are now handled by SymPy.
Refactor the
Operatorclass, each representation has its own classMatrixOperator,WeightedPauliOperatorandTPBGroupedPauliOperator.The
powerinevolution_instructionwas applied on the theta on the CRZ gate directly, the new version repeats the circuits to implement power.CircuitCache is OFF by default, and it can be set via environment variable now
QISKIT_AQUA_CIRCUIT_CACHE.
பிழை திருத்தங்கள்¶
A bug where
TruthTableOraclewould build incorrect circuits for truth tables with only a single1value.A bug caused by
PyEDA's indeterminism.A bug with
QPE/IQPE's translation and stretch computation.Chemistry: Bravyi-Kitaev mapping fixed when num qubits was not a power of 2
Setup
initial_layoutinQuantumInstancevia a list.
Removed¶
General multi-controlled rotation gate
mcu3is removed and replaced by multi-controlled rotation gatesmcrx,mcry, andmcrz
Deprecated¶
The
Operatorclass is deprecated, in favor of usingMatrixOperator,WeightedPauliOperatorandTPBGroupedPauliOperator.
IBM Q Provider 0.3¶
எந்த மாற்றங்களும் இல்லை
Qiskit 0.11.1¶
We have bumped up Qiskit micro version to 0.11.1 because IBM Q Provider has bumped its micro version as well.
Terra 0.8¶
No Change
Aer 0.2¶
எந்த மாற்றங்களும் இல்லை
Ignis 0.1¶
No Change
Aqua 0.5¶
qiskit-aqua has been updated to 0.5.3 to fix code related to
changes in how gates inverses are done.
IBM Q Provider 0.3¶
The IBMQProvider has been updated to version 0.3.1 to fix
backward compatibility issues and work with the default 10 job
limit in single calls to the IBM Q API v2.
Qiskit 0.11¶
We have bumped up Qiskit minor version to 0.11 because IBM Q Provider has bumped up its minor version too. On Aer, we have jumped from 0.2.1 to 0.2.3 because there was an issue detected right after releasing 0.2.2 and before Qiskit 0.11 went online.
Terra 0.8¶
No Change
Aer 0.2¶
New features¶
Added support for multi-controlled phase gates
Added optimized anti-diagonal single-qubit gates
Improvements¶
Introduced a technique called Fusion that increments performance of circuit execution Tuned threading strategy to gain performance in most common scenarios.
Some of the already implemented error models have been polished.
Ignis 0.1¶
No Change
Aqua 0.5¶
No Change
IBM Q Provider 0.3¶
The IBMQProvider has been updated in order to default to use the new
IBM Q Experience v2. Accessing the legacy IBM Q Experience v1 and QConsole
will still be supported during the 0.3.x line until its final deprecation one
month from the release. It is encouraged to update to the new IBM Q
Experience to take advantage of the new functionality and features.
Updating to the new IBM Q Experience v2¶
If you have credentials for the legacy IBM Q Experience stored on disk, you can make use of the interactive helper:
from qiskit import IBMQ
IBMQ.update_account()
For more complex cases or fine tuning your configuration, the following methods are available:
the
IBMQ.delete_accounts()can be used for resetting your configuration file.the
IBMQ.save_account('MY_TOKEN')method can be used for saving your credentials, following the instructions in the IBM Q Experience v2 account page.
Updating your programs¶
When using the new IBM Q Experience v2 through the provider, access to backends
is done via individual provider instances (as opposed to accessing them
directly through the qiskit.IBMQ object as in previous versions), which
allows for more granular control over the project you are using.
You can get a reference to the providers that you have access to using the
IBMQ.providers() and IBMQ.get_provider() methods:
from qiskit import IBMQ
provider = IBMQ.load_account()
my_providers = IBMQ.providers()
provider_2 = IBMQ.get_provider(hub='A', group='B', project='C')
For convenience, IBMQ.load_account() and IBMQ.enable_account() will
return a provider for the open access project, which is the default in the new
IBM Q Experience v2.
For example, the following program in previous versions:
from qiskit import IBMQ
IBMQ.load_accounts()
backend = IBMQ.get_backend('ibmqx4')
backend_2 = IBMQ.get_backend('ibmq_qasm_simulator', hub='HUB2')
Would be equivalent to the following program in the current version:
from qiskit import IBMQ
provider = IBMQ.load_account()
backend = provider.get_backend('ibmqx4')
provider_2 = IBMQ.get_provider(hub='HUB2')
backend_2 = provider_2.get_backend('ibmq_qasm_simulator')
You can find more information and details in the IBM Q Provider documentation.
Qiskit 0.10¶
Terra 0.8¶
No Change
Aer 0.2¶
No Change
Ignis 0.1¶
No Change
Aqua 0.5¶
No Change
IBM Q Provider 0.2¶
புதிய அம்சங்கள்¶
பிழை திருத்தங்கள்¶
Qiskit 0.9¶
Terra 0.8¶
Highlights¶
Introduction of the Pulse module under
qiskit.pulse, which includes tools for building pulse commands, scheduling them on pulse channels, visualization, and running them on IBM Q devices.Improved QuantumCircuit and Instruction classes, allowing for the composition of arbitrary sub-circuits into larger circuits, and also for creating parameterized circuits.
A powerful Quantum Info module under
qiskit.quantum_info, providing tools to work with operators and channels and to use them inside circuits.New transpiler optimization passes and access to predefined transpiling routines.
புதிய அம்சங்கள்¶
The core
StochasticSwaproutine is implemented in Cython.Added
QuantumChannelclasses for manipulating quantum channels and CPTP maps.Support for parameterized circuits.
The
PassManagerinterface has been improved and new functions added for easier interaction and usage with custom pass managers.Preset
PassManagers are now included which offer a predetermined pipeline of transpiler passes.User configuration files to let local environments override default values for some functions.
New transpiler passes:
EnlargeWithAncilla,Unroll2Q,NoiseAdaptiveLayout,OptimizeSwapBeforeMeasure,RemoveDiagonalGatesBeforeMeasure,CommutativeCancellation,Collect2qBlocks, andConsolidateBlocks.
Compatibility Considerations¶
0.8 வெளியீடுகளின் பகுதியாக பின்வரும் விஷயங்கள் புதுப்பிக்கப்பட்டு, அல்லது ஒரு எதிர்காமல் வெளியீட்டில் ஒரு பின்னணி முறையில் நீக்கப்படும் அல்லது மாற்றியமைக்கப்படும். சரியாக தேவையில்லையென்றால், எதிர்காலத்தில் ஒரு வெடிப்பு மாற்றத்தை தவிர்க்க 0.9 (இல்லையென்றால்) விடுதலை செய்யும் விஷயங்கள்.
` DAGCircuit`` பொருளில் `` _ஜெட்`` மூலம் முன்னொட்டுள்ள முறைகள் அந்த முன்னொட்டு இல்லாமல் மறுபெயரிடப்படுகின்றன.
டூப்பிள்களிலிருந்து பட்டியல்களுக்கு `` கூப்பிங் மேப்பின்` `` இணைப்பு பட்டியலில்` மாற்றப்பட்ட கூறுகள்.
அலுவலர் தளங்கள் இப்போது வெளிப்படையாகக் கொண்டிருக்க வேண்டும், மற்றும் உள்வாங்கும் ஒரு தகவல் ` ` QiskitError ` `.
`` Qiskit.tools.qcvv`` தொகுப்பு நீக்கப்பட்டது மற்றும் எதிர்காலத்தில் அகற்றப்படும். இந்த தொகுதியை மாற்றும் கிஸ்கிட் இக்னிஸைப் பயன்படுத்த நீங்கள் இடம்பெயர வேண்டும்.
`` Qiskit.compile () `` செயல்பாடு இப்போது வெளிப்படையாக `` qiskit.compiler.transpile () `` ஒரு சுற்றுவட்டத்தை மாற்றுவதற்கான செயல்பாட்டைப் பயன்படுத்துவதற்கு ஆதரவாக நீக்கப்பட்டது, அதைத் தொடர்ந்து `` qiskit.compiler.assemble () `` அதிலிருந்து ஒரு கோப்ஜை உருவாக்க. `` தொகுத்தல் (...) `` என்பதற்கு பதிலாக, `` ஒன்றுகூடு (டிரான்ஸ்பைல் (...), ...) `` ஐப் பயன்படுத்தவும்.
` qiskit.converters.qobj_to_circuits () `` நீக்கப்பட்டது மற்றும் எதிர்கால வெளியீட்டில் அகற்றப்படும். அதற்கு பதிலாக `` qiskit.assembler.disassemble () `` தொகுக்கப்பட்ட Qobj இலிருந்து `` QuantumCircuit`` பொருட்களைப் பிரித்தெடுக்கப் பயன்படுத்தப்பட வேண்டும்.
`` Qiskit.mapper`` பெயர்வெளி நீக்கப்பட்டது. `` லேஅவுட்`` மற்றும் `` கப்ளிங் மேப்`` வகுப்புகளை `` qiskit.transpiler`` வழியாக அணுகலாம்.
`` Qiskit.tools.qi.qi`` இல் உள்ள சில செயல்பாடுகள் நீக்கப்பட்டு `` qiskit.quantum_info`` க்கு நகர்த்தப்பட்டுள்ளன.
இந்த விடுதலை போது சில பின்னணி மாற்றங்கள் செய்யப்பட்டுள்ளது என்று குறிப்பிடுக. பின்வரும் குறிப்புகள் இந்த மாற்றங்களை எப்படி ஏற்றுக்கொள்ளும் எப்படி தகவல்களை கொண்டுள்ளது.
IBM Q வழங்குபவர்¶
அவர் ஐபிஎம் கியூ வழங்குநர் முன்பு டெர்ராவில் சேர்க்கப்பட்டார், ஆனால் அது ஒரு தனி தொகுப்பாக பிரிக்கப்பட்டுள்ளது `` கிஸ்கிட்-இப்மக்-வழங்குநர்``. `` பிப் இன்ஸ்டால் கிஸ்கிட்-இப்மக்-வழங்குநர்`` உடன் பைபி வழியாகவோ அல்லது `` கிஸ்கிட்.ஐ.பி.எம்.கியூ`` அல்லது `` qiskit.providers.ibmq`` ஐ அணுக மூலத்திலிருந்து இது நிறுவப்பட வேண்டும். `` பிப் இன்ஸ்டால் கிஸ்கிட்`` உடன் நீங்கள் கிஸ்கிட்டை நிறுவினால், அது தானாகவே கிஸ்கிட் திட்டத்தின் அனைத்து துணைப் பொதிகளையும் நிறுவும்.
சைதான் கூறுகள்¶
0.8 வெளியீட்டில் தொடங்கி, கோர் ஸ்டோகாஸ்டிக் ஸ்வாப் வழக்கம் இப்போது Cython <https://cython.org/> __ இல் செயல்படுத்தப்படுகிறது. ஸ்வாப்பரின் செயல்திறனை கணிசமாக மேம்படுத்துவதற்காக இது செய்யப்பட்டது, இருப்பினும் நீங்கள் டெர்ராவை மூலத்திலிருந்து உருவாக்கினால் அல்லது x86 அல்லாத அல்லது பிற இயங்குதளத்தில் முன் கட்டப்பட்ட சக்கரங்கள் இல்லாமல் இயங்கினால் மற்றும் மூல விநியோகத்திலிருந்து நிறுவினால், நீங்கள் முன்பு சைதான் நிறுவியிருப்பதை உறுதி செய்ய வேண்டும். Qiskit டெர்ராவை நிறுவ / கட்டமைக்க. பிப் / பைபி மூலம் இதை எளிதாக செய்யலாம்: `` pip install Cython``.
கம்பைலர் பணிப்பாய்வு¶
``` Qiskit.compile () `` செயல்பாடு நீக்கப்பட்டு, முதலில் `` qiskit.compiler.transpile () `` ஐ அழைப்பதன் மூலம் ஒரு சுற்றுவட்டத்தில் தேர்வுமுறை மற்றும் மேப்பிங்கை இயக்கவும், பின்னர் `` qiskit.compiler.assemble () `` ஒரு பின்தளத்தில் அனுப்ப அந்த உகந்த சுற்றிலிருந்து ஒரு கோப்ஜ் உருவாக்க. இது ஒரு நீக்கம் மட்டுமே என்றாலும், நீங்கள் பழைய `` qiskit.compile () `` அழைப்பைப் பயன்படுத்தினால் அது ஒரு எச்சரிக்கையை வெளியிடும்.
transpile(), assemble(), execute() parameters
இந்த செயல்பாடுகள் அதிக சுமை மற்றும் பரந்த அளவிலான உள்ளீடுகளை ஏற்றுக்கொள்கின்றன. அவர்கள் சுற்று மற்றும் துடிப்பு உள்ளீடுகளை கையாள முடியும். இந்த செயல்பாடுகளுக்கான `` பின்தளத்தில்`` தவிர அனைத்து குவார்க்குகளும் இப்போது முன்னர் ஏற்றுக்கொள்ளப்பட்ட வகைகளின் பட்டியல்களையும் ஏற்றுக்கொள்கின்றன. `` ஆரம்ப_ லேஅவுட்`` குவார்க் இப்போது பட்டியல் மற்றும் அகராதி இரண்டாக வழங்கப்படலாம், எ.கா. 13 மற்றும் 14 குவிட்களில் பெல் பரிசோதனையை வரைபடமாக்க, நீங்கள் வழங்கலாம்: `` ஆரம்ப_லேயவுட் = [13, 14] `` அல்லது `` ஆரம்ப_லேயவுட் = {qr [0]: 13, qr [1]: 14} ```
Qobj¶
பயன்பாட்டு வழக்கைப் பொறுத்து Qobj வகுப்பு இரண்டு தனித்தனி துணைப்பிரிவுகளாக பிரிக்கப்பட்டுள்ளது, முறையே துடிப்பு மற்றும் சுற்று வேலைகளுக்கு `` PulseQobj`` அல்லது QasmQobj. நீங்கள் நேரடியாக கோப்ஜுடன் தொடர்புகொள்கிறீர்கள் என்றால் அதற்கேற்ப உங்கள் பயன்பாட்டை சரிசெய்ய வேண்டியிருக்கும்.
The qiskit.qobj.qobj_to_dict() is removed. Instead use the to_dict()
method of a Qobj object.
Visualization¶
காட்சிப்படுத்தல் தொகுதிக்கு மிகப்பெரிய மாற்றம் இது `` qiskit.tools.visualization`` இலிருந்து `` qiskit.visualization`` க்கு நகர்த்தப்பட்டுள்ளது. காட்சிப்படுத்தல் தொகுதி ஒரு கருவியை விட அதிகம் என்பதைக் குறிக்க இது செய்யப்பட்டது. இருப்பினும், 0.7 வெளியீட்டில் இந்த இடைமுகம் நிலையானதாக அறிவிக்கப்பட்டதால், `` qiskit.tools.visualization`` இன் பொது இடைமுகம் தொடர்ந்து செயல்படும். எதிர்கால வெளியீட்டில் அது மாறக்கூடும், ஆனால் அது நடந்தால் அகற்றப்படுவதற்கு முன்பு அது நீக்கப்படும்.
முன்னர் நீக்கப்பட்ட செயல்பாடுகள், plot_circuit(), latex_circuit_drawer(), generate_latex_source() மற்றும் matplotlib_circuit_drawer() qiskit.tools.visualization இலிருந்து நீக்கப்பட்டன. இந்த செயல்பாடுகளுக்கு பதிலாக, qiskit.visualization.circuit_drawer () ஐ பொருத்தமான வாதங்களுடன் அழைப்பது பயன்படுத்தப்பட வேண்டும்.
`` style`` குவார்க் அகராதியில் முன்னர் நீக்கப்பட்ட `` plot_barries`` மற்றும் `` reverse_bits`` விசைகள் நீக்கப்பட்டன, அதற்கு பதிலாக `` qiskit.visualization.circuit_drawer () `` குவார்க்ஸ் plot_barries மற்றும் ``reverse_bits `` பயன்படுத்தப்பட வேண்டும்.
விக்னர் சதி செயல்பாடுகள் `` plot_wigner_function``, `` plot_wigner_curve``, `` plot_wigner_plaquette``, மற்றும் `` plot_wigner_data`` முன்பு `` qiskit.tools.visualization._state_visualization`` தொகுதியில் நீக்கப்பட்டன. அவை ஒருபோதும் பொது நிலையான இடைமுகத்தின் மூலம் வெளிப்படுத்தப்படவில்லை மற்றும் நன்கு ஆவணப்படுத்தப்படவில்லை. இந்த அம்சத்தைப் பயன்படுத்துவதற்கான குறியீட்டை கிஸ்கிட்-டுடோரியல் களஞ்சியத்தின் மூலம் இன்னும் அணுகலாம்.
Mapper¶
`` Qiskit.mapper`` இலிருந்து பொது Api `` qiskit.transpiler`` க்கு நகர்த்தப்பட்டது. இந்த வெளியீட்டில் மட்டுமே அது நீக்கப்பட்டிருந்தாலும், இது 0.9 வெளியீட்டில் அகற்றப்படும், எனவே `` கிஸ்கிட் 'க்கு பதிலாக `` கிஸ்கிட்.ரான்ஸ்பைலர்`` இலிருந்து இறக்குமதி செய்ய உங்கள் `` லேஅவுட்`` மற்றும் `` கப்ளிங் மேப்`` ஆகியவற்றைப் பயன்படுத்துகிறது. அது நடப்பதற்கு முன் மேப்பர் எதிர்காலத்தில் எந்த ஆச்சரியங்களையும் தவிர்க்கும்.
Aer 0.2¶
புதிய அம்சங்கள்¶
மல்டிபிளெக்சர் கேட் சேர்க்கப்பட்டது: pull_aer: `192
` noise.utils`` இல் `` remap_noise_model`` செயல்பாடு சேர்க்கப்பட்டது:pull_aer: 181
Added
__eq__method toNoiseModel,QuantumError,ReadoutError#181இரைச்சல் மாதிரிகளில் பெயரிடப்பட்ட கேட்களுக்கான ஆதரவு சேர்க்கப்பட்டது :pull_aer:` 175 `
Added optimized
mcx,mcy,mcz,mcu1,mcu2,mcu3, gates toQubitVector#124`` QubitVector`` இல் உகந்த கட்டுப்பாட்டு-இடமாற்று கேட் சேர்க்கப்பட்டது:pull_aer: 142
`` QasmController`` க்கான கேட்-ஃப்யூஷன் தேர்வுமுறை சேர்க்கப்பட்டது, இது `` fusion_enable=true``:pull_aer: 136
தோல்வியுற்ற உருவகப்படுத்துதல்களின் சிறந்த நிர்வாகத்தைச் சேர்த்தது:pull_aer: `167
சேர்க்கப்பட்ட குவிட்கள் பயன்படுத்தப்படாத க்விட்களுக்கான தேர்வுமுறை துண்டிக்கப்படுகின்றன:pull_aer: `164
சாதன இரைச்சல் மாதிரியில் டிப்போலரைசிங் பிழையை முடக்கும் திறன் சேர்க்கப்பட்டது: pull_aer: `131
`` ஸ்டேட்வெக்டர்_ஸ்டேட்`` க்கு சிமுலேட்டர் அறிவுறுத்தலைத் துவக்கியது: pull_aer: 117 ,: pull_aer:` 137
சிமுலேட்டர்களில் இணைப்பு வரைபடங்கள் சேர்க்கப்பட்டன:pull_aer: 93
Added circuit optimization framework #83
டெபியன் போன்ற விநியோகங்களுக்கு சக்கரங்கள் துணைபுரிகின்றன: pull_aer: `69
Qasm சிமுலேட்டருக்கான நூல்களின் தானியங்கு கட்டமைப்பு சேர்க்கப்பட்டது: pull_aer: 61
நிலைப்படுத்தி தரவரிசை சிதைவுகளை அடிப்படையாகக் கொண்ட உருவகப்படுத்துதல் முறை: pull_aer: 51
`` NoiseModel`` init: pull_aer: 175 இல்` அடிப்படை_கேட்ஸ்` குவார்க் சேர்க்கப்பட்டது.
நிலையான json நூலகத்தைப் பயன்படுத்தி தொடர்ச்சியாக வரிசைப்படுத்தக்கூடிய அகராதிகளைத் திருப்புவதற்கு `` NoiseModel.as_dict () `` க்கு ஒரு விருப்ப அளவுருவைச் சேர்த்தது: pull_aer: 165
மறுசீரமைப்பு நூல் மேலாண்மை: pull_aer: `50
இரைச்சல் மாற்றங்களை மேம்படுத்தவும்: pull_aer: 162
பிழை அறிக்கையை மேம்படுத்தவும்: pull_aer: 160
`` அதிகபட்சம்_மெமரி_எம்பி`` உடன் இணையான செயல்திறனை மேம்படுத்தவும் `` பின்தளத்தில்_ஒப்டிஸின்` புதிய அளவுரு: pull_aer: 61
`` ஸ்டேட்வெக்டர்`` இல் u1 செயல்திறனை மேம்படுத்தவும்: pull_aer: `123
பிழை திருத்தங்கள்¶
டெர்ரா செருகு நிரலுக்கான மேகோஸில் நிலையான ஓப்பன் எம்.பி மோதல் சிக்கல்கள்: pull_aer: `46
Compatibility Considerations¶
`` காஸ்மிமுலேட்டர்`` மற்றும் `` ஸ்டேட்வெக்டர் சிமுலேட்டர்``: புல்_ஆயர்: `185
`` "சாப்_தெரெஷோல்ட்" `` பின்தளத்தில் விருப்பத்தை `` "ஜீரோ_தெரெஷோல்ட்" என மாற்றி, இயல்புநிலை மதிப்பை 1e-10 ஆக மாற்றியது: pull_aer: 185
Ignis 0.1¶
புதிய அம்சங்கள்¶
குவாண்டம் தொகுதி
வெப்பம் சிக்குறுத்தும் வளிமண்டலங்கள்
ஒரே நேரத்தில் ஆர். பி. க்கு கிளிஃபோர்ட் வாயில்களை துணைக்குழுக்களில் சீரமைக்க விருப்பம் உள்ளது
Measurement correction can produce a new calibration for a subset of qubits
Compatibility Considerations¶
RB writes to the minimal set of classical registers (it used to be Q[i]->C[i]). This change enables measurement correction with RB. Unless users had external analysis code, this will not change outcomes. RB circuits from 0.1 are not compatible with 0.1.1 fitters.
Aqua 0.5¶
புதிய அம்சங்கள்¶
Implementation of the HHL algorithm supporting
LinearSystemInputPluggable component
Eigenvalueswith variantEigQPEPluggable component
Reciprocalwith variantsLookupRotationandLongDivisionMultiple-Controlled U1 and U3 operations
mcu1andmcu3Pluggable component
QFTderived from componentIQFTSummarized the transpiled circuits at the DEBUG logging level
QuantumInstanceacceptsbasis_gatesandcoupling_mapagain.Support to use
cxgate for the entanglement inRYandRYRZvariational form (czis the default choice)Support to use arbitrary mixer Hamiltonian in QAOA, allowing use of QAOA in constrained optimization problems [arXiv:1709.03489]
Added variational algorithm base class
VQAlgorithm, implemented byVQEandQSVMVariationalAdded
ising/docplex.pyfor automatically generating Ising Hamiltonian from optimization models of DOcplexAdded
'basic-dirty-ancilla' mode formctAdded
mcmtfor Multi-Controlled, Multi-Target gateExposed capabilities to generate circuits from logical AND, OR, DNF (disjunctive normal forms), and CNF (conjunctive normal forms) formulae
Added the capability to generate circuits from ESOP (exclusive sum of products) formulae with optional optimization based on Quine-McCluskey and ExactCover
Added
LogicalExpressionOraclefor generating oracle circuits from arbitrary Boolean logic expressions (including DIMACS support) with optional optimization capabilityவிருப்ப தேர்வுமுறை திறனுடன் உண்மை அட்டவணையில் இருந்து ஆரக்கிள் சுற்றுகளை உருவாக்குவதற்கு `` TruthTableOracle`` சேர்க்கப்பட்டது
பயனர் குறிப்பிட்ட சுற்றுகளிலிருந்து ஆரக்கிளை உருவாக்குவதற்கு `` CustomCircuitOracle`` சேர்க்கப்பட்டது
Deutsch-Jozsa வழிமுறையின் செயல்படுத்தல் சேர்க்கப்பட்டது
பெர்ன்ஸ்டைன்-வஜிராணி வழிமுறையின் செயல்பாட்டைச் சேர்த்தது
சைமனின் வழிமுறையின் செயல்பாட்டைச் சேர்த்தது
ஷோரின் வழிமுறையின் செயல்பாட்டைச் சேர்த்தது
ஒரு தனிப்பயன் ஆரம்ப நிலையை எடுக்கும் (முன்னிருப்பு அலுவலக சூப்பர்நிலைக்கு எதிராக)
ஏற்கனவே உள்ள சாளரத்தை பயன்படுத்தி ` ` தனிப்பயன் ` ` ஆரம்ப நிலையை உருவாக்க இயலவில்லை
ADAM (மற்றும் AMSGRAD) தேர்வுமுறை வழிமுறை சேர்க்கப்பட்டது
பன்முக விநியோகங்கள் சேர்க்கப்பட்டன, எனவே நிச்சயமற்ற மாதிரிகள் இப்போது ஒரே மாதிரியான மற்றும் பன்முக விநியோக கூறுகளைக் கொண்டுள்ளன
Added option to include or skip the swaps operations for qft and iqft circuit constructions
கூடுதலான நேர அமைப்பு அமைப்பு ` ` ExactLSsolver ` `
ஹெர்மிடியன் அல்லாத மற்றும் கணிதமற்றவர்களை ஆதரிப்பதற்காக `` எச்.எச்.எல்`` வழிமுறையில் `` ஆட்டோ_ஹெர்மிட்டியன்`` மற்றும் `` ஆட்டோ_ரசைஸ்`` அளவுருக்கள் சேர்க்கப்பட்டன: 2 ^ n அளவிலான மெட்ரிக்குகள்
மற்றொரு அம்ச வரைபடத்தைச் சேர்த்துள்ளார், `` ராஃபீச்சர்வெக்டர்``, இது வகைப்படுத்தலுக்கான அம்ச திசையன்களை க்விட்ஸின் நிலைகளுக்கு நேரடியாக வரைபடமாக்குகிறது
SVM_Classicalcan now load models trained byQSVM
பிழை திருத்தங்கள்¶
Fixed ` `ising/docplex.py ` ` ` ` தவறான நிலையான மதிப்புகள் சரியாக மதிப்பிடப்பட்டுள்ளது
`` Setuptools.find_namespace_packages`` ஐப் பயன்படுத்தி பெயர்வெளி தொகுப்புகளை சரியாக அடையாளம் காண நிலையான தொகுப்பு அமைப்பு
Compatibility Considerations¶
QuantumInstancedoes not takememoryanymore.Moved command line and GUI to separate repo (
qiskit_aqua_uis)`` SAT``- குறிப்பிட்ட ஆரக்கிள் அகற்றப்பட்டது (இப்போது `` LogicalExpressionOracle`` ஆல் ஆதரிக்கப்படுகிறது)
`` Mct`` இன் `` மேம்பட்ட`` பயன்முறை செயல்படுத்தல் மாற்றப்பட்டது: `` ch`` க்கு பதிலாக எளிய `` h`` வாயில்களைப் பயன்படுத்துதல், மற்றும் `` _ மல்டிக்ஸ்`` இல் பழைய மறுநிகழ்வு படிநிலையை சரிசெய்தல்
கூறுகள் `` சீரற்ற_விளையாடல்கள்```` நிச்சயமற்ற_ மாதிரிகள்` என மறுபெயரிடப்பட்டது
பல்வேறு பொதுவான வாயில்களின் கட்டுமானங்களை மறுசீரமைத்தது (`` சி``, `` அழ``, `` எம். சி. ஆர்``, `` எம். சி. டி``, `` எம். சி 1``, `` எம். சி 3``, `` எம். சி. எம். டி``, `` லாஜிக்_ஆன்ட்``, மற்றும் `` லாஜிக்_அர்``) மற்றும் சுற்றுகள் (`` ஃபேஸ்எஸ்டிமேஷன் சர்க்யூட்``, `` பூலியன் லாஜிக் சர்க்யூட்ஸ்``, `` ஃபோரியர் டிரான்ஸ்ஃபார்ம் சர்க்யூட்ஸ்``, மற்றும் `` ஸ்டேட்வெக்டர் சர்க்யூட்ஸ்``)
மாறுபட்ட குவாண்டம் வகைப்படுத்தியைக் குறிக்கும் `` QSVM மாறுபாடு`` என்ற வழிமுறையை `` VQC`` என மறுபெயரிட்டது
`` QSVMKernel`` என்ற வழிமுறையை `` QSVM`` என மறுபெயரிட்டது
`` எஸ். வி. எம். இன்புட்`` என்ற வகுப்பை `` கிளாசிஃபிகேஷன்இன்புட்`` என மறுபெயரிட்டது
மறுபெயரிடப்பட்ட சிக்கல் வகை `` 'svm_classification'`` முதல்
' வகைப்பாடுவரைபட்டியல்களின் பட்டியலுக்கு `` அம்ச வரைபடம்`` மற்றும் `` மாறுபாட்டு வடிவம்`` ஆகியவற்றில் பயன்படுத்தப்படும் `` என்டாங்க்லர்_மாப்`` வகையை மாற்றியது
IBM Q Provider 0.1¶
புதிய அம்சங்கள்¶
இது ஒரு முழுமையான தொகுப்பாக முதல் வெளியீடாகும். நீங்கள் டெர்ரா தனித்தனியாக நிறுவுகிறீர்களானால், நீங்கள் ஐபிஎம் கியூ பின்தளத்தில் பயன்படுத்த விரும்பினால் `` கிஸ்கிட்-இப்மக்-வழங்குநர்`` தொகுப்பை `` பைப் நிறுவு கிஸ்கிட்-இப்மக்-வழங்குநர்`` உடன் நிறுவ வேண்டும்.
Qobj வடிவமைப்பு பணிகளுக்கு ஆதரவு வழங்குபவர் இருந்து நீக்கப்பட்டது. நீங்கள் சமர்ப்பிக்கப்படுவதற்கு முன்பு Qobj க்கு ஒரு பழைய வடிவத்தில் உரிமையை மாற்ற வேண்டும்.
Qiskit 0.8¶
கிஸ்கிட் 0.8 இல் கிஸ்கிட் இக்னிஸ் உறுப்பை அறிமுகப்படுத்தினோம். இது கிஸ்கிட் டெர்ரா உறுப்பு 0.7.1 வெளியீட்டையும் உள்ளடக்கியது, இதில் பேசிக் ஏர் பைதான் சிமுலேட்டருக்கான பிழை திருத்தம் உள்ளது.
Terra 0.7¶
No Change
Aer 0.1¶
No Change
Ignis 0.1¶
This is the first release of Qiskit Ignis.
Qiskit 0.7¶
In Qiskit 0.7 we introduced Qiskit Aer and combined it with Qiskit Terra.
Terra 0.7¶
புதிய அம்சங்கள்¶
இந்த விடுதலை பல புதிய அம்சங்களையும் மற்றும் பல வழிப் படைப்புகளையும் உள்ளடக்குகிறது. இதன் மூலம் சுற்றுச்சூழல் வரைபடம், ஹிஸ்டோகிராம், பிளாக் வெக்டர்ஸ், மற்றும் மாநில விசைவுகளுக்கான இடைமுகங்கள் நிலையாக அறிவிக்கப்பட்டுள்ளன. கூடுதலாக இந்த விடுதலை ஒரு வரையறுக்கப்பட்ட மற்றும் நிலையான பிட் கோட்பாடு /endianness முழுவதும் Qiskit ஆகியவற்றை உள்ளடக்குகிறது. இவை அனைத்தும் இந்த விடுதலையில் நிலையான இடைமுகங்கள் என அறிவிக்கப்பட்டுள்ளன, இது எந்த மாற்றங்களையும் முன்னேற்றம் செய்கிறது.
பின்வரும் புதிய அம்சங்களின் அறிமுகம் உள்ளது:
புதிய ASCII கலை சுற்றுப்பாதை வெளியீட்டு முறைமை
`` குவாண்டம் சிர்க்யூட்`` பொருள்களின் புதிய சர்க்யூட் வரைதல் இடைமுகம், `` சர்க்யூட் டிரா () `` அல்லது `` அச்சு (சுற்று) `` அழைப்புகளைச் செயல்படுத்துகிறது
ஒரு சுற்றுவட்டத்தின் DAG பிரதிநிதித்துவத்தை வரைவதற்கான ஒரு காட்சிப்படுத்தல்
உள்ளூர் மேட்லோட்லிப் அடிப்படையிலான மாநில அடுக்குகளில் உள்ள ஹிண்டன் வரைபடங்களுக்கான புதிய குவாண்டம் மாநில சதி வகை
`` குவாண்டம் சர்க்யூட்`` வகுப்பிலிருந்து ``_காஸ்ம்_ஸ்ட்ர் ()` மற்றும் ஃப்ரம்_காஸ்ம்_ஃபைல் () `ஆகியவற்றிலிருந்து 2 புதிய கட்டமைப்பாளர் முறைகள், இது OpenQASM இலிருந்து ஒரு சுற்று பொருளை எளிதாக உருவாக்க உங்களை அனுமதிக்கிறது
ஒரு புதிய செயல்பாடு `` plot_bloch_multivector () `` ஒரு பதற்றமான மாநில திசையன் அல்லது அடர்த்தி மேட்ரிக்ஸிலிருந்து ப்ளொச் திசையன்களைத் திட்டமிட
ஒவ்வொரு ஷாட் அளவீட்டு முடிவுகள் சிமுலேட்டர்கள் மற்றும் தேர்ந்தெடுக்கப்பட்ட சாதனங்களில் கிடைக்கின்றன. `` தொகுத்தல் () `` அல்லது `` செயல்படுத்து () `` என்று அழைக்கும் போது `` மெமரி`` குவார்க்கை `` உண்மை`` என அமைப்பதன் மூலம் அணுகலாம், பின்னர் `` get_memory () `` முறையைப் பயன்படுத்தி அணுகலாம். `` முடிவு`` பொருள்.
புதுப்பிக்கப்பட்ட பவுலி பொருள்கள் மற்றும் குவாண்டம் நிலைகளுடன் பணிபுரியும் முறைகள் கொண்ட `` qiskit.quantum_info`` தொகுதி
சுற்று பகுப்பாய்வு மற்றும் மாற்றத்திற்கான புதிய டிரான்ஸ்பைல் பாஸ்கள்: `` கம்யூட்டேஷன் அனலிசிஸ்``, `` கம்யூட்டேஷன் டிரான்ஸ்ஃபார்மேஷன்``, `` சி. எக்ஸ் ரத்துசெய்தல்``, `` சிதைவு``, `` அன்ரோல்``, `` ஆப்டிமைஸ் 1 கியூட்ஸ்``, `` செக்மேப்``. , `` சி .எக்ஸ் டைரக்ஷன்``, `` பேரியர் பீஃபர்ஃபைனல் மெஷர்மென்ட்ஸ்``
டிரான்ஸ்பைலரில் புதிய மாற்று இடமாற்று மேப்பர் கடந்து செல்கிறது: `` பேசிக் ஸ்வாப்``, `` லுக்ஹெட் ஸ்வாப்``, `` ஸ்டோகாஸ்டிக் ஸ்வாப்``
மேலும் முன்னேற்றக் கூடுதலான தன்மைகள் ஆய்வுகளுக்கான ஆதரவுடன், மாற்றம் கடந்து, ஒரு உலகளாவிய ` ` வளைவு அமைப்பு ` ` கடவுச்சொல் நிர்வாகி, மற்றும் மீண்டும்-செல்வதற்கு கட்டுப்பாட்டை வரை
Compatibility Considerations¶
0.7 வெளியீட்டின் ஒரு பகுதியாக பின்வரும் விஷயங்கள் நீக்கப்பட்டன, மேலும் அவை எதிர்கால வெளியீட்டில் அகற்றப்படும் அல்லது பின்னோக்கி பொருந்தாத வகையில் மாற்றப்படும். கண்டிப்பாக அவசியமில்லை என்றாலும், அடுத்த வெளியீட்டிற்கு முன்னர் சரிசெய்ய வேண்டிய விஷயங்கள் முறிந்த மாற்றத்தைத் தவிர்க்கின்றன.
`` plot_circuit () ``, `` latex_circuit_drawer () ``, `` generate_latex_source () ``, மற்றும் `` matplotlib_circuit_drawer () `` qiskit.tools.visualization இலிருந்து நீக்கப்படும். அதற்கு பதிலாக, ஒரே தொகுதியிலிருந்து `` சர்க்யூட்_ டிராவர் () `` செயல்பாடு பயன்படுத்தப்பட வேண்டும், நீக்கப்பட்ட அனைத்து செயல்பாடுகளின் செயல்பாட்டையும் பிரதிபலிக்க குவார்க் விருப்பங்கள் உள்ளன.
தற்போதைய முன்னிருப்பு வெளியீடு ` ` சுற்றுச்சூழல் அலங்காரம் () ` ` (latex மற்றும் பைலோன் மீண்டும் பின்பற்றுவதை பயன்படுத்தி) ` ` உரை ` ` வெளியீட்டை எதிர்காண வெளியீட்டில் முன்னிருப்பாக பயன்படுத்த மாற்றப்படும்.
`` Qiskit.wrapper.load_qasm_string () `` மற்றும் `` qiskit.wrapper.load_qasm_file () `` செயல்பாடுகள் நீக்கப்பட்டன மற்றும் `` QuantumCircuit.from_qasm_str () `` மற்றும் `` QuantumCircuit.from_qasm_) அதற்கு பதிலாக பயன்படுத்தப்பட வேண்டும்.
`` ஸ்டைல்`` குவார்க் அகராதியில் உள்ள `` சதி_ தடைகள்`` மற்றும் `` தலைகீழ்_பிட்ஸ்`` விசைகள் நீக்கப்பட்டன, அதற்கு பதிலாக `` qiskit.tools.visualization.circuit_drawer () `` குவார்க்ஸ் `` சதி_ தடைகள்` மற்றும் `` தலைகீழ்_பிட்கள் `` அதற்கு பதிலாக பயன்படுத்தப்பட வேண்டும்.
அவர் செயல்படுகிறார் `` சதி_நிலையம் () `` மற்றும் `` iplot_state () `` தேய்மானம் செய்யப்பட்டுள்ளது. அதற்கு பதிலாக `` சதி_நிலையம் _ * () `` மற்றும் `` iplot_state _ * () `` செயல்பாடுகளை தேவையான காட்சிப்படுத்தல் முறைக்கு அழைக்க வேண்டும்.
`` ஸ்கிப்_ டிரான்ஸ்பைலர்`` வாதம் `` தொகுத்தல் () `` மற்றும் `` செயல்படுத்து () `` ஆகியவற்றிலிருந்து நீக்கப்பட்டது. அதற்கு பதிலாக நீங்கள் `` பாஸ் மேனேஜர்`` ஐ நேரடியாகப் பயன்படுத்தலாம், `` பாஸ் மேனேஜர்`` ஐ வெற்று `` பாஸ் மேனேஜர்`` பொருளை பாஸ்மேனேஜர் () `உடன் அமைக்கவும்
வெவ்வேறு வெளியீட்டு வடிவங்களை வெளியிடுவதற்கான `` டிரான்ஸ்பைல்_டாக் () `` செயல்பாடு `` வடிவம்`` குவார்க் நீக்கப்பட்டது, அதற்கு பதிலாக நீங்கள் இயல்புநிலை வெளியீட்டை `` DAGCircuit`` பொருளை விரும்பிய வடிவத்திற்கு மாற்ற வேண்டும்.
அன்ரோலர்கள் நீக்கப்பட்டன, DAG க்கு DAG ஐ மட்டுமே முன்னோக்கி நகர்த்துவது ஆதரிக்கப்படும்.
இந்த விடுதலை போது சில பின்னணி மாற்றங்கள் செய்யப்பட்டுள்ளது என்று குறிப்பிடுக. பின்வரும் குறிப்புகள் இந்த மாற்றங்களை எப்படி ஏற்றுக்கொள்ளும் எப்படி தகவல்களை கொண்டுள்ளது.
Changes to Result objects¶
முடிவடைந்த பொருளின் மீண்டும் எழுதப் பொருளின் பகுதியாக மற்றும் ஒரு நிலையான இடைமுகம் முன்னேறும் ஒரு நிலையான இடைமுகம், நீங்கள் விளைவு பொருளில் சேமிக்கப்பட்ட தரவுகளை எப்படி அணுக வேண்டும். முதலில் ` ` gget_data () ` முறையை ` தரவு () ` ` தரவு () ` ` ` . ஒப்பந்தம் () ` ` என்று மாற்றியமைக்கப்பட்டுள்ளது. இது இப்போது எந்த பதவி-செயல்திறனை செய்யும் அதற்கு பதிலாக பின்னூட்டத்திலிருந்து முழு தகவல்கள் திரும்ப வருகின்றது. உதாரணமாக, முந்தைய பதிப்பில் நீங்கள் அழைக்க முடியும்:
result = execute(circuit, backend).result()
unitary = result.get_data()['unitary']
print(unitary)
அது:: போன்ற ஒற்றையாட்சி அணியைத் தரும்:
[[1+0j, 0+0.5j], [0-0.5j][-1+0j]]
ஆனால் இப்போது நீங்கள் அழைத்தால் (மறுபெயரிடப்பட்ட முறையுடன்):
result.data()['unitary']
it will return something like:
[[[1, 0], [0, -0.5]], [[0, -0.5], [-1, 0]]]
இடுகை செயலாக்கப்பட்ட முடிவுகளை 0.7 வெளியீட்டிற்கு முந்தைய வடிவத்தில் பெற நீங்கள் முடிவு பொருளுக்குப் பதிலாக `` get_counts () ``, `` get_statevector () ``, மற்றும் `` get_unitary () `` முறைகளைப் பயன்படுத்த வேண்டும். `` get_data () ['எண்ணிக்கைகள்'] ``, `` get_data () ['ஸ்டேட்வெக்டர்'] ``, மற்றும் `` get_data () ['ஒற்றையாட்சி'] `` முறையே.
கூடுதலாக, `` len () `` க்கான ஆதரவு மற்றும் `` Result`` பொருளின் அட்டவணைப்படுத்தல் நீக்கப்பட்டன. அதற்கு பதிலாக நீங்கள் முடிவு பொருள்களில் இடுகையிடப்பட்ட செயலாக்க முறைகளின் வெளியீட்டைக் கையாள வேண்டும்.
Also, the get_snapshot() and get_snapshots() methods from the
Result class have been removed. Instead you can access the snapshots
using Result.data()['snapshots'].
Changes to Visualization¶
The largest change made to visualization in the 0.7 release is the removal of
Matplotlib and other visualization dependencies from the project requirements.
This was done to simplify the requirements and configuration required for
installing Qiskit. If you plan to use any visualizations (including all the
jupyter magics) except for the text, latex, and latex_source
output for the circuit drawer you'll you must manually ensure that
the visualization dependencies are installed. You can leverage the optional
requirements to the Qiskit Terra package to do this:
pip install qiskit-terra[visualization]
Aside from this there have been changes made to several of the interfaces
as part of the stabilization which may have an impact on existing code.
The first is the basis kwarg in the circuit_drawer() function
is no longer accepted. If you were relying on the circuit_drawer() to
adjust the basis gates used in drawing a circuit diagram you will have to
do this priort to calling circuit_drawer(). For example:
from qiskit.tools import visualization
visualization.circuit_drawer(circuit, basis_gates='x,U,CX')
will have to be adjusted to be:
from qiskit import BasicAer
from qiskit import transpiler
from qiskit.tools import visualization
backend = BasicAer.backend('qasm_simulator')
draw_circ = transpiler.transpile(circuit, backend, basis_gates='x,U,CX')
visualization.circuit_drawer(draw_circ)
Moving forward the circuit_drawer() function will be the sole interface
for circuit drawing in the visualization module. Prior to the 0.7 release there
were several other functions which either used different output backends or
changed the output for drawing circuits. However, all those other functions
have been deprecated and that functionality has been integrated as options
on circuit_drawer().
For the other visualization functions, plot_histogram() and
plot_state() there are also a few changes to check when upgrading. First
is the output from these functions has changed, in prior releases these would
interactively show the output visualization. However that has changed to
instead return a matplotlib.Figure object. This provides much more
flexibility and options to interact with the visualization prior to saving or
showing it. This will require adjustment to how these functions are consumed.
For example, prior to this release when calling:
plot_histogram(counts)
plot_state(rho)
would open up new windows (depending on matplotlib backend) to display the
visualization. However starting in the 0.7 you'll have to call show() on
the output to mirror this behavior. For example:
plot_histogram(counts).show()
plot_state(rho).show()
அல்லது:
hist_fig = plot_histogram(counts)
state_fig = plot_state(rho)
hist_fig.show()
state_fig.show()
இது ஜூபிட்டருக்கு வெளியே இயங்கும் போது மட்டுமே என்பதை நினைவில் கொள்க. ஜூபிட்டர் சூழலுக்குள் எந்த மாற்றமும் தேவையில்லை, ஏனென்றால் `` Matplotlib.Figure`` பொருள்களை எவ்வாறு வழங்குவது என்பதை ஜூபிட்டர் குறிப்பேடுகள் பூர்வீகமாக புரிந்துகொள்கின்றன.
However, returning the Figure object provides additional flexibility for
dealing with the output. For example instead of just showing the figure you
can now directly save it to a file by leveraging the savefig() method.
For example:
hist_fig = plot_histogram(counts)
state_fig = plot_state(rho)
hist_fig.savefig('histogram.png')
state_fig.savefig('state_plot.png')
The other key aspect which has changed with these functions is when running
under jupyter. In the 0.6 release plot_state() and plot_histogram()
when running under jupyter the default behavior was to use the interactive
Javascript plots if the externally hosted Javascript library for rendering
the visualization was reachable over the network. If not it would just use
the matplotlib version. However in the 0.7 release this no longer the case,
and separate functions for the interactive plots, iplot_state() and
iplot_histogram() are to be used instead. plot_state() and
plot_histogram() always use the matplotlib versions.
கூடுதலாக, இந்த வெளியீட்டில் தொடங்கி `` plot_state() `` செயல்பாடு ஒரு குவாண்டம் நிலையைத் திட்டமிடும் ஒவ்வொரு முறைக்கும் தனிப்பட்ட முறைகளை அழைப்பதற்கு ஆதரவாக நீக்கப்படுகிறது. ``plot_state() `` செயல்பாடு 0.9 வெளியீடு வரை தொடர்ந்து செயல்படும், அது ஒவ்வொரு முறையும் பயன்படுத்தப்படும்போது ஒரு எச்சரிக்கையை வெளியிடும். தி
Qiskit Terra 0.6 |
Qiskit Terra 0.7+ |
|---|---|
plot_state(rho) |
plot_state_city(rho) |
plot_state(rho, method='city') |
plot_state_city(rho) |
plot_state(rho, method='paulivec') |
plot_state_paulivec(rho) |
plot_state(rho, method='qsphere') |
plot_state_qsphere(rho) |
plot_state(rho, method='bloch') |
plot_bloch_multivector(rho) |
plot_state(rho, method='hinton') |
plot_state_hinton(rho) |
ஊடாடும் JS சமமான `` iplot_state () `` க்கும் இது பொருந்தும். ஒவ்வொரு செயல்பாட்டிற்கும் ஒரு முன்னரே தயாரிக்கப்பட்ட i உடன், செயல்பாட்டு பெயர்கள் அனைத்தும் ஒரே மாதிரியானவை. எடுத்துக்காட்டாக, `` iplot_state (rho, method = 'paulivec') `` என்பது `` iplot_state_paulivec (rho) ``.
Changes to Backends¶
With the improvements made in the 0.7 release there are a few things related
to backends to keep in mind when upgrading. The biggest change is the
restructuring of the provider instances in the root qiskit` namespace.
The Aer provider is not installed by default and requires the installation
of the qiskit-aer package. This package contains the new high performance
fully featured simulator. If you installed via pip install qiskit you'll
already have this installed. The python simulators are now available under
qiskit.BasicAer and the old C++ simulators are available with
qiskit.LegacySimulators. This also means that the implicit fallback to
python based simulators when the C++ simulators are not found doesn't exist
anymore. If you ask for a local C++ based simulator backend, and it can't be
found an exception will be raised instead of just using the python simulator
instead.
Additionally the previously deprecation top level functions register() and
available_backends() have been removed. Also, the deprecated
backend.parameters() and backend.calibration() methods have been
removed in favor of backend.properties(). You can refer to the 0.6 release
notes section பின்னணிகளுடன் பணிசெய்யவும் for more details on these changes.
The backend.jobs() and backend.retrieve_jobs() calls no longer return
results from those jobs. Instead you must call the result() method on the
returned jobs objects.
Changes to the compiler, transpiler, and unrollers¶
As part of an effort to stabilize the compiler interfaces there have been
several changes to be aware of when leveraging the compiler functions.
First it is important to note that the qiskit.transpiler.transpile()
function now takes a QuantumCircuit object (or a list of them) and returns
a QuantumCircuit object (or a list of them). The DAG processing is done
internally now.
You can also easily switch between circuits, DAGs, and Qobj now using the
functions in qiskit.converters.
Aer 0.1¶
புதிய அம்சங்கள்¶
Aer provides three simulator backends:
QasmSimulator: simulate experiments and return measurement outcomesStatevectorSimulator: return the final statevector for a quantum circuit acting on the all zero stateUnitarySimulator: return the unitary matrix for a quantum circuit
noise module: contains advanced noise modeling features for the
QasmSimulator
NoiseModel,QuantumError,ReadoutErrorclasses for simulating a Qiskit quantum circuit in the presence of errorserrorssubmodule including functions for generatingQuantumErrorobjects for the following types of quantum errors: Kraus, mixed unitary, coherent unitary, Pauli, depolarizing, thermal relaxation, amplitude damping, phase damping, combined phase and amplitude dampingdevicesubmodule for automatically generating a noise model based on theBackendPropertiesof a device
utils module:
qobj_utilsprovides functions for directly modifying a Qobj to insert special simulator instructions not yet supported through the Qiskit Terra API.
Aqua 0.4¶
புதிய அம்சங்கள்¶
வழிமுறைகள் மற்றும் கூறுகளுக்கான நிரல் API கள் - ஒவ்வொரு கூறுகளும் இப்போது ஒற்றை (காலியாக இல்லாத) கட்டமைப்பாளர் அழைப்பு வழியாக உடனடி மற்றும் துவக்கப்படலாம்
QuantumInstanceAPI for algorithm/backend decoupling --QuantumInstanceencapsulates a backend and its settingsUpdated documentation and Jupyter Notebooks illustrating the new programmatic APIs
Transparent parallelization for gradient-based optimizers
Multiple-Controlled-NOT (cnx) operation
Pluggable algorithmic component
RandomDistributionConcrete implementations of
RandomDistribution:BernoulliDistribution,LogNormalDistribution,MultivariateDistribution,MultivariateNormalDistribution,MultivariateUniformDistribution,NormalDistribution,UniformDistribution, andUnivariateDistributionConcrete implementations of
UncertaintyProblem:FixedIncomeExpectedValue,EuropeanCallExpectedValue, andEuropeanCallDeltaAmplitude Estimation algorithm
Qiskit உகப்பாக்கம்: தேர்வுமுறை சிக்கல்களுக்கான புதிய ஐசிங் மாதிரிகள் சரியான கவர், செட் பேக்கிங், வெர்டெக்ஸ் கவர், க்ளிக் மற்றும் வரைபட பகிர்வு
Qiskit AI:
New feature maps extending the
FeatureMappluggable interface:PauliExpansionandPauliZExpansionTraining model serialization/deserialization mechanism
Qiskit Finance:
பெர்னௌலி சீரற்ற மாறிக்கான வீச்சு மதிப்பீடு: ஒற்றை குவிட் சிக்கலில் வீச்சு மதிப்பீட்டின் விளக்கம்
Loading of multiple univariate and multivariate random distributions
European call option: expected value and delta (using univariate distributions)
Fixed income asset pricing: expected value (using multivariate distributions)
`` Operator`` வகுப்பில் உள்ள பவுலி சரம் டெர்ரா 0.7 உடன் சீரமைக்கப்பட்டுள்ளது. இப்போது ஒரு n-qubit pauli சரத்தின் வரிசை `` q_ {n-1}... q {0} `` இவ்வாறு, (டி) சீரியல் (
save_to_dictமற்றும் 'load_from_dict`)Pauliவகுப்பின் மாற்றங்களை ஏற்க 'Operator` வகுப்பும் மாற்றப்பட்டுள்ளது.
Compatibility Considerations¶
HartreeFockcomponent of pluggable typeInitialStatemoved to Qiskit ChemistryUCCSDcomponent of pluggable typeVariationalFormmoved to Qiskit Chemistry
Qiskit 0.6¶
Terra 0.6¶
Highlights¶
இந்த விடுதலை ஒரு புதிய, ஆரம்ப தகவல் தொடர்பு வடிவமைப்பு (Qobj) ஆகியவற்றின் மீதான ஒரு மறுபடியும், பயனர் அனுபவத்தை முழுவதுமாக மேம்படுத்துவதற்கு நீண்ட காலாவதியான அம்சங்களையும் கொண்டுள்ளது. The highlights, ஒப்பிடுகையில் 0.5 வெளியீடு:
உள்நுழைவுகளுக்கான முன்னேற்றங்கள் (Qobj specification (based on the Qobj specification) and extensibility (வளிமங்கள் புதிய பின்னணிகளுடன் விரிவாக்குவதற்கு வசதிகள்)
IBM Q பின்னணிகளுக்கான சான்றுகள் மற்றும் அணுகுமுறையை கையாளும் புதிய விருப்பங்கள், பயனர் சான்றுகளின் தானியங்கி ஏற்றத்தை ஆதரவளிக்கும்
காட்சிப்படுத்தல் பயன்பாடுகளின் மறுசீரமைப்பு: ஸ்டைலான ஊடாடும் காட்சிப்படுத்தல்கள் இப்போது ஜூபிட்டர் பயனர்களுக்குக் கிடைக்கின்றன, சர்க்யூட் டிராயருக்கான சுத்திகரிப்புகளுடன் (மேட்லோட்லிப் அடிப்படையிலான பதிப்பு உட்பட)
சர்க்யூட் டிரான்ஸ்பிளேஷனை மையமாகக் கொண்ட செயல்திறன் மேம்பாடுகள்: சர்க்யூட் தொகுப்பின் இணையானமயமாக்கல் மற்றும் ஏராளமான மேம்படுத்தல்கள் உள்ளிட்ட மிகவும் நெகிழ்வான மற்றும் மட்டு கட்டமைப்பிற்கான அடிப்படை அமைக்கப்பட்டுள்ளது
Compatibility Considerations¶
இந்த விடுதலை போது சில பின்னணி மாற்றங்கள் செய்யப்பட்டுள்ளது என்று குறிப்பிடுக. பின்வரும் குறிப்புகள் இந்த மாற்றங்களை எப்படி ஏற்றுக்கொள்ளும் எப்படி தகவல்களை கொண்டுள்ளது.
`` குவாண்டம் புரோகிராம்`` ஐ அகற்றுதல்¶
0.5 வெளியீட்டின் போது சுட்டிக்காட்டப்பட்டபடி, `` குவாண்டம் புரோகிராம்`` வகுப்பின் நீக்கம் இப்போது நிறைவடைந்துள்ளது, மேலும் அது தனிப்பட்ட கூறுகளுடன் பணிபுரிய ஆதரவாக இனி கிடைக்காது (: வகுப்பு: ~ qiskit.backends.basejob.BaseJob, : வகுப்பு: ~ qiskit._quantumcircuit.QuantumCircuit ,: வகுப்பு:` ~ qiskit._classicalregister.ClassicalRegister.
தயவுசெய்து சரிபார்க்கவும்: ref: 0.5 வெளியீட்டுக் குறிப்புகள் <quantum-program-0-5> மற்றும் மாற்றம் குறித்த விவரங்களுக்கான எடுத்துக்காட்டுகள்
from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister
from qiskit import Aer, execute
q = QuantumRegister(2)
c = ClassicalRegister(2)
qc = QuantumCircuit(q, c)
qc.h(q[0])
qc.cx(q[0], q[1])
qc.measure(q, c)
backend = get_backend('qasm_simulator')
job_sim = execute(qc, backend)
sim_result = job_sim.result()
print("simulation: ", sim_result)
print(sim_result.get_counts(qc))
IBM Q அங்கீகாரம் மற்றும் `` Qconfig.py``¶
IBM Q பின்னணிகளை பயன்படுத்தும்போது அங்கீகரிக்க பரிந்துரைகளின் நிர்வாகம் விரிவாக்கப்பட்டு, வலைப்பதிவுகளுக்கு பயன்படும் புதிய விருப்பங்கள் உள்ளன:
உங்கள் சான்றுகள் தட்டில் ஒரு முறை சேமிக்க, மற்றும் தானாகவே அவற்றை எதிர்காண அமர்வுகளாக ஏற்றவும். இது ஒரு ஒற்றை மின்சாரம் வழங்குகிறது:
from qiskit import IBMQ IBMQ.save_account('MY_API_TOKEN', 'MY_API_URL')
பின்னர், உங்கள் நற்சான்றிதழ்களை வட்டில் இருந்து தானாகவே ஏற்ற முடியும்: மெத்: ~ qiskit.backends.ibmq.ibmqprovider.IBMQ.load_accounts
from qiskit import IBMQ IBMQ.load_accounts()
அல்லது ஒரு அமர்வில் உள்ளவற்றை மட்டுமே பயன்படுத்த விரும்பினால் குறிப்பிட்ட கணக்குகளை மட்டுமே ஏற்ற முடியும்:
IBMQ.load_accounts(project='MY_PROJECT')
சூழல் மாறிகள் பயன்படுத்த. `` QE_TOKEN`` மற்றும் `` QE_URL`` ஆகியவை அமைக்கப்பட்டால், `` IBMQ.load_accounts () `` அழைப்பு தானாகவே அவர்களிடமிருந்து சான்றுகளை ஏற்றும்.
கூடுதலாக, நிரல் கோப்புறையில் `` Qconfig.py`` கோப்பை வைத்திருப்பதற்கும், சான்றுகளை வெளிப்படையாக அனுப்புவதற்கும் முந்தைய முறை இன்னும் ஆதரிக்கப்படுகிறது.
பின்னணிகளுடன் பணிசெய்யவும்¶
புதிய வழிமுறை டெர்ரா 0.6 இல் ஒரு பின்தளத்தில் பெறுவதற்கான பரிந்துரைக்கப்பட்ட வழியாக அறிமுகப்படுத்தப்பட்டுள்ளது, இது மிகவும் சக்திவாய்ந்த மற்றும் ஒருங்கிணைந்த வடிகட்டலை அனுமதிக்கிறது மற்றும் புதிய நற்சான்றிதழ் அமைப்புடன் ஒருங்கிணைக்கப்படுகிறது. முந்தைய உயர்மட்ட முறைகள்: மெத்: ~ qiskit.wrapper._wrapper.register ,: மெத்:` ~ qiskit.wrapper._wrapper.available_backends` மற்றும்: மெத்: ~ qiskit.wrapper._wrapper.get_backend இன்னும் ஆதரிக்கப்படுகின்றன , ஆனால் வரவிருக்கும் பதிப்புகளில் qiskit.IBMQ மற்றும்` qiskit.Aer` பொருள்களை நேரடியாகப் பயன்படுத்துவதற்கு ஆதரவாக நீக்கப்படும், இது மிகவும் சிக்கலான வடிகட்டலை அனுமதிக்கும்.
உதாரணமாக, பட்டியல் மற்றும் ஒரு உள்ளூர் பின்னணியை பயன்படுத்தவும்:
from qiskit import Aer
all_local_backends = Aer.backends(local=True) # returns a list of instances
qasm_simulator = Aer.backends('qasm_simulator')
மற்றும் தொலைதூர பின்னணிகளை உபயோகிக்கவும்:
from qiskit import IBMQ
IBMQ.enable_account('MY_API_TOKEN')
5_qubit_devices = IBMQ.backends(simulator=True, n_qubits=5)
ibmqx4 = IBMQ.get_backend('ibmqx4')
தயவு செய்து தயவு செய்து, உள்ளூர் உலாவிகளின் பெயர்களை எளிமைப்படுத்தப்பட்டுள்ளன. முந்தைய பெயர்களை இன்னும் பயன்படுத்த முடியும், ஆனால் புதிய, குறுகிய பெயர்களை பயன்படுத்த ஊக்குவித்துள்ளது:
Qiskit Terra 0.5 |
Qiskit Terra 0.6 |
|---|---|
' local_qasm_simulator ' |
' qasm_ simulator ' |
' local_statevector_simulator ' |
' statevector_simulator ' |
' local_unitary_simulator_ py ' |
' unitary_simulator ' |
பின்னணி மற்றும் பணி API மாற்றங்கள்¶
ஐபிஎம் கியூ பின்தளத்தில் சமர்ப்பிக்கப்பட்ட வேலைகள் மேம்பட்ட திறன்களைக் கொண்டுள்ளன. அவற்றை ரத்துசெய்து வரவுகளை நிரப்பவும் (`` job.cancel ()
), மற்றும் ஒரு குறிப்பிட்ட பின்தளத்தில் செயல்படுத்தப்பட்ட முந்தைய வேலைகளை வேலை ஐடி (backend.retrieve_job (job_id)) அல்லது தொகுப்பில் மீட்டெடுக்க முடியும். சமீபத்திய வேலைகள் (பின்தளத்தில்.ஜோப்ஸ் (வரம்பு) ``)ஒவ்வொரு தனிப்பட்ட வேலை நிலையையும் சரிபார்க்கும் பண்புகள் (`` வரிசை``, `` இயங்கும்``, `` சரிபார்க்கும்``, `` முடிந்தது`` மற்றும் `` ரத்துசெய்யப்பட்ட``) இனி இருக்காது. நீங்கள் வேலை நிலையை சரிபார்க்க விரும்பினால், `` job.status``:: க்கு எதிரான அடையாள ஒப்பீட்டைப் பயன்படுத்தவும்:
from qiskit.backends import JobStatus job = execute(circuit, backend) if job.status() is JobStatus.RUNNING: handle_job(job)
எளிமைப்படுத்தப்பட்ட API ஐ எவ்வாறு பயன்படுத்துவது என்பது பற்றிய கூடுதல் நுண்ணறிவைப் பெற தயவுசெய்து: வர்க்கத்தின் புதிய ஆவணங்களை அணுகவும்: ~ qiskit.backends.ibmq.ibmqjob.IBMQJob வகுப்பு.
பல உறுப்பினர்கள்: வர்க்கம்: ~ qiskit.backends.basebackend.BaseBackend மற்றும்: class:` ~ qiskit.backends.basejob.BaseJob` இனி பண்புகள் அல்ல, ஆனால் முறைகள், இதன் விளைவாக அவை செயல்படுத்தப்பட வேண்டும் செயல்பாடுகள்.
Qiskit Terra 0.5
Qiskit Terra 0.6
backend.name
backend.name()
backend.status
backend.status ()
backend.configuration
backend.configuration()
backend.calibration
backend.properties()
backend.parameters
backend.jobs() backend.retrieve_job(job_id)
job.status
job.status()
job.cancelled
job.queue_position()
job.running
job.cancel()
job.queued
job.done
சிறந்த ஜூபிட்டர் கருவிகள்¶
புதிய வெளியீட்டில் ஜூபிட்டர் நோட்புக்குகளைப் பயன்படுத்தும் போது பயனர் அனுபவத்தின் மேம்பாடுகள் உள்ளன.
First, new interactive visualizations of counts histograms and quantum states
are provided:
plot_histogram() and
plot_state().
These methods will default to the new interactive kind when the environment
is Jupyter and internet connection exists.
Secondly, the new release provides Jupyter cell magics for keeping track of
the progress of your code. Use %%qiskit_job_status to keep track of the
status of submitted jobs to IBM Q backends. Use %%qiskit_progress_bar to
keep track of the progress of compilation/execution.
Qiskit 0.5¶
Terra 0.5¶
Highlights¶
This release brings a number of improvements to Qiskit, both for the user experience and under the hood. Please refer to the full changelog for a detailed description of the changes - the highlights are:
new
statevectorsimulatorsand feature and performance improvements to the existing ones (in particular to the C++ simulator), along with a reorganization of how to work with backends focused on extensibility and flexibility (using aliases and backend providers)ஒத்திசைவற்ற அம்சங்களை மறுசீரமைத்தல், ஒத்திசைவற்ற முறையில் வேலைகளை இயக்குவதற்கு ஒரு நட்பு இடைமுகத்தை வழங்குதல்:class: Job நிகழ்வுகள்
பயனர்களின் வசதிக்காகவும் (அநாமதேய பதிவேடுகளை அனுமதிப்பது போன்றவை) மற்றும் மேம்பட்ட செயல்பாட்டிற்காகவும் (சுற்றுகளின் மேம்பட்ட சதித்திட்டம் போன்றவை) டெர்ரா முழுவதும் ஏராளமான மேம்பாடுகள் மற்றும் திருத்தங்கள்
Compatibility Considerations¶
தற்போதைய வெளியீட்டின் விளைவாக இந்த வெளியீட்டின் போது பல பின்னோக்கி-பொருந்தாத மாற்றங்கள் அறிமுகப்படுத்தப்பட்டுள்ளன என்பதை நினைவில் கொள்க. இந்த அம்சங்களில் சில முழுமையாக நீக்கப்படுவதற்கு முன்னர் ஒரு காலகட்டத்தில் தொடர்ந்து ஆதரிக்கப்படும் என்றாலும், புதிய பதிப்புகளைத் தயாரிப்பதற்கும் புதிய செயல்பாட்டைப் பயன்படுத்துவதற்கும் உங்கள் நிரல்களைப் புதுப்பிக்க பரிந்துரைக்கப்படுகிறது.
QuantumProgram மாற்றம்¶
வகுப்பின் பல முறைகள்:class: ~ qiskit.QuantumProgram வகுப்பில் இருந்து நீக்கப்படும் பாதையில் உள்ளன:
பின்தளத்தில் மற்றும் API உடன் ** தொடர்புகொள்வதற்கான முறைகள் **:
ஐபிஎம் கியூ ஏபிஐக்கு இணைப்பைத் திறப்பதற்கும், பின்தளத்தில் பயன்படுத்துவதற்கும் பரிந்துரைக்கப்பட்ட வழி, ``QuantumProgram '` முறைகளுக்கு பதிலாக நேரடியாக உயர்மட்ட செயல்பாடுகளின் வழியாகும். குறிப்பாக,:func: qiskit.register முறை முந்தையவற்றுக்கு சமமானதை வழங்குகிறது:func:` qiskit.QuantumProgram.set_api` அழைப்பு. இதேபோன்ற ஒரு நரம்பில், ஒரு புதிய:func: qiskit.available_backends ,:func:` qiskit.get_backend` மற்றும் கிடைக்கக்கூடிய பின்தளத்தில் நேரடியாக வினவுவதற்கான தொடர்புடைய செயல்பாடுகள் உள்ளன. எடுத்துக்காட்டாக, பதிப்பு 0.4 க்கான பின்வரும் துணுக்கை
from qiskit import QuantumProgram quantum_program = QuantumProgram() quantum_program.set_api(token, url) backends = quantum_program.available_backends() print(quantum_program.get_backend_status('ibmqx4')
பதிப்பு 0. 5 க்கு பின்வரும் குறும்படத்துக்கு சமமானது:
from qiskit import register, available_backends, get_backend register(token, url) backends = available_backends() backend = get_backend('ibmqx4') print(backend.status)
** நிரல்களை தொகுத்தல் மற்றும் செயல்படுத்துவதற்கான ** முறைகள்:
உயர்மட்ட செயல்பாடுகள் இப்போது:func: qiskit.QuantumProgram.compile மற்றும் :func:` qiskit.QuantumProgram.execute` முறைகளுக்கும் சமமானவற்றை வழங்குகின்றன. எடுத்துக்காட்டாக, பதிப்பு 0.4 :: இலிருந்து பின்வரும் துணுக்கை:
quantum_program.execute(circuit, args, ...)
பதிப்பு 0. 5 க்கு பின்வரும் குறும்படத்துக்கு சமமானது:
from qiskit import execute execute(circuit, args, ...)
பொதுவாக, பதிப்பு 0.5 முதல் QuantumProgram ஐ நம்புவதற்கு பதிலாக தனிப்பட்ட பொருள்கள் மற்றும் வகுப்புகளை நேரடியாகப் பயன்படுத்த முயற்சிக்க ஊக்குவிக்கிறோம். எடுத்துக்காட்டாக, ஒரு:class: ~ qiskit.QuantumCircuit ஐ சேர்ப்பதன் மூலம் உடனடி மற்றும் கட்டமைக்க முடியும்:class:` ~ qiskit.QuantumRegister` ,:class: ~ qiskit.ClassicalRegister, மற்றும் வாயில்கள் நேரடியாக. குயிக்ஸ்டார்ட் பிரிவில் புதுப்பிப்பு உதாரணத்தை சரிபார்க்கவும் அல்லது பிரதான களஞ்சியத்தில் `` using_qiskit_core_level_0.py`` மற்றும் `` using_qiskit_core_level_1.py`` எடுத்துக்காட்டுகளைப் பார்க்கவும்.
பின்னணி பெயர் மாற்றம்¶
பின்தளத்தில் இன்னும் விரிவாக்கக்கூடிய கட்டமைப்பை வழங்குவதற்காக, அதற்கேற்ப சில வடிவமைப்பு மாற்றங்கள் செய்யப்பட்டுள்ளன:
** உள்ளார்ந்த உரையாடல் பெயர்கள் * *
அதே மாதிரியைப் பின்பற்றுவதற்காக உள்ளூர் சிமுலேட்டர்களின் பெயர்கள் ஒரே மாதிரியாக மாற்றப்பட்டுள்ளன:
PROVIDERNAME_TYPE_simulator_LANGUAGEORPROJECT- எடுத்துக்காட்டாக, முன்னர்local_qiskit_simulatorஎன்று பெயரிடப்பட்ட சி ++ சிமுலேட்டர் இப்போது `` local_qasm_simulator_cpp``. தற்போதைய சிமுலேட்டர்களின் கண்ணோட்டம்:QASMசிமுலேட்டர் ஒரு சோதனை போல இருக்க வேண்டும். நீங்கள் சில வினாடிகளில் ஒரு சுற்று பயன்படுத்துகிறீர்கள், மற்றும் அளவீட்டு முடிவுகளைக் கவனிக்கவும் - மேலும் `` result.get_counts () `` வழியாக எண்ணிக்கையின் வரைபடத்தைப் பெற பல காட்சிகளுக்கு நீங்கள் மீண்டும் செய்கிறீர்கள்.Statevectorசிமுலேட்டர் என்பது பூஜ்ஜிய நிலையை சுற்று வழியாக உருவாக்கிய பிறகு முழு ஸ்டேட்வெக்டரை (:math: 2 ^ n பெருக்கங்கள்) பெறுவதோடு, ``result.get_statevector()``வழியாகவும் பெறலாம்.Unitaryசிமுலேட்டர் என்பது சுற்றுக்கு நிகரான யூனிட் மேட்ரிக்ஸைப் பெறுவது, `` result.get_unitary () `` வழியாக திரும்பியது.கூடுதலாக, சுற்றுவட்டத்தின் பல்வேறு இடங்களில்
snapshot(slot)அறிவுறுத்தலைப் பயன்படுத்துவதன் மூலம் ஒரு சிமுலேட்டரிடமிருந்து இடைநிலை நிலைகளைப் பெறலாம். இது கொடுக்கப்பட்ட ஸ்லாட்டில் சிமுலேட்டரின் தற்போதைய நிலையைச் சேமிக்கும், பின்னர் `` result.get_snapshot (slot) `` வழியாக மீட்டெடுக்கலாம்.
** பின்தளத்தில் மாற்றுப்பெயர்கள் **:
SDK இப்போது ஒரு "alias" அமைப்பை வழங்குகிறது, இது உங்கள் கணினியில் கிடைத்தால், ஒரு குறிப்பிட்ட வகையின் மிகச் சிறந்த செயல்திறன் கொண்ட சிமுலேட்டரை தானாகவே பயன்படுத்த அனுமதிக்கிறது. எடுத்துக்காட்டாக, பின்வரும் துணுக்குடன்:
from qiskit import get_backend backend = get_backend('local_statevector_simulator')
பின்தளத்தில் சி ++ ஸ்டேட்வெக்டர் சிமுலேட்டராக இருந்தால், பைத்தான் ஸ்டேட்வெக்டர் சிமுலேட்டரில் இல்லாவிட்டால் மீண்டும் விழும்.
கூடுதலான பெயர் மற்றும் அளபுருக்கள்¶
SDK இன் பல செயல்பாடுகள் அதிக நேர்மையான மற்றும் பயனர் நம்பிக்கை செய்யப்பட்டுள்ளன:
** தானியங்கி சுற்றுச்சொல் மற்றும் பதிவு பெயர்கள் **
qiskit.ClassicalRegister,qiskit.QuantumRegisterandqiskit.QuantumCircuitcan now be instantiated without explicitly giving them a name - a new autonaming feature will automatically assign them an identifier:q = QuantumRegister(2)
அளவுருக்களின் வரிசை
QuantumRegister(size, name)மாற்றப்பட்டுள்ளது என்பதையும் நினைவில் கொள்க.** பெயர்கள் அல்லது நிகழ்வுகளை ஏற்றுக்கொள்ளும் முறைகள் **
தன்னியக்க மாற்றங்களுடன் இணைந்து, பல முறைகள்:func: qiskit.Result.get_data இப்போது பெயர்கள் மற்றும் நிகழ்வுகளை வசதிக்காக ஏற்றுக்கொள்கின்றன. எடுத்துக்காட்டாக, ஒற்றை சுற்று கொண்ட ஒரு வேலைக்கான முடிவுகளை மீட்டெடுக்கும்போது:
qc = QuantumCircuit(..., name='my_circuit') job = execute(qc, ...) result = job.result()
பின்வரும் அழைப்புகள் சமமானவை:
data = result.get_data('my_circuit') data = result.get_data(qc) data = result.get_data()